mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 18:52:50 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
57
node_modules/range-parser/README.md
generated
vendored
Normal file
57
node_modules/range-parser/README.md
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# range-parser
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Range header field parser.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install range-parser
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var parseRange = require('range-parser')
|
||||
```
|
||||
|
||||
### parseRange(size, header)
|
||||
|
||||
Parse the given `header` string where `size` is the maximum size of the resource.
|
||||
An array of ranges will be returned or negative numbers indicating an error parsing.
|
||||
|
||||
* `-2` signals a malformed header string
|
||||
* `-1` signals an invalid range
|
||||
|
||||
```js
|
||||
// parse header from request
|
||||
var range = parseRange(req.headers.range)
|
||||
|
||||
// the type of the range
|
||||
if (range.type === 'bytes') {
|
||||
// the ranges
|
||||
range.forEach(function (r) {
|
||||
// do something with r.start and r.end
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/range-parser.svg
|
||||
[npm-url]: https://npmjs.org/package/range-parser
|
||||
[node-version-image]: https://img.shields.io/node/v/range-parser.svg
|
||||
[node-version-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg
|
||||
[travis-url]: https://travis-ci.org/jshttp/range-parser
|
||||
[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/range-parser
|
||||
[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg
|
||||
[downloads-url]: https://npmjs.org/package/range-parser
|
||||
Reference in New Issue
Block a user