range-parser
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -0,1 +1,6 @@ | ||
1.2.1 / 2019-05-10 | ||
================== | ||
* Improve error when `str` is not a string | ||
1.2.0 / 2016-06-01 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -28,2 +28,6 @@ /*! | ||
function rangeParser (size, str, options) { | ||
if (typeof str !== 'string') { | ||
throw new TypeError('argument str must be a string') | ||
} | ||
var index = str.indexOf('=') | ||
@@ -30,0 +34,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Range header field string parser", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"contributors": [ | ||
@@ -20,8 +20,12 @@ "Douglas Christopher Wilson <doug@somethingdoug.com>", | ||
"devDependencies": { | ||
"eslint": "2.11.1", | ||
"eslint-config-standard": "5.3.1", | ||
"eslint-plugin-promise": "1.1.0", | ||
"eslint-plugin-standard": "1.3.2", | ||
"istanbul": "0.4.3", | ||
"mocha": "1.21.5" | ||
"deep-equal": "1.0.1", | ||
"eslint": "5.16.0", | ||
"eslint-config-standard": "12.0.0", | ||
"eslint-plugin-markdown": "1.0.0", | ||
"eslint-plugin-import": "2.17.2", | ||
"eslint-plugin-node": "8.0.1", | ||
"eslint-plugin-promise": "4.1.1", | ||
"eslint-plugin-standard": "4.0.0", | ||
"mocha": "6.1.4", | ||
"nyc": "14.1.1" | ||
}, | ||
@@ -37,7 +41,7 @@ "files": [ | ||
"scripts": { | ||
"lint": "eslint **/*.js", | ||
"lint": "eslint --plugin markdown --ext js,md .", | ||
"test": "mocha --reporter spec", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot" | ||
"test-cov": "nyc --reporter=html --reporter=text npm test", | ||
"test-travis": "nyc --reporter=text npm test" | ||
} | ||
} |
# range-parser | ||
[![NPM Version][npm-image]][npm-url] | ||
[![NPM Downloads][downloads-image]][downloads-url] | ||
[![Node.js Version][node-version-image]][node-version-url] | ||
[![NPM Version][npm-version-image]][npm-url] | ||
[![NPM Downloads][npm-downloads-image]][npm-url] | ||
[![Node.js Version][node-image]][node-url] | ||
[![Build Status][travis-image]][travis-url] | ||
@@ -13,3 +13,7 @@ [![Test Coverage][coveralls-image]][coveralls-url] | ||
``` | ||
This is a [Node.js](https://nodejs.org/en/) module available through the | ||
[npm registry](https://www.npmjs.com/). Installation is done using the | ||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally): | ||
```sh | ||
$ npm install range-parser | ||
@@ -20,2 +24,4 @@ ``` | ||
<!-- eslint-disable no-unused-vars --> | ||
```js | ||
@@ -33,2 +39,4 @@ var parseRange = require('range-parser') | ||
<!-- eslint-disable no-undef --> | ||
```js | ||
@@ -57,2 +65,4 @@ // parse header from request | ||
<!-- eslint-disable no-undef --> | ||
```js | ||
@@ -70,11 +80,10 @@ parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true }) | ||
[npm-image]: https://img.shields.io/npm/v/range-parser.svg | ||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/range-parser/master | ||
[coveralls-url]: https://coveralls.io/r/jshttp/range-parser?branch=master | ||
[node-image]: https://badgen.net/npm/node/range-parser | ||
[node-url]: https://nodejs.org/en/download | ||
[npm-downloads-image]: https://badgen.net/npm/dm/range-parser | ||
[npm-url]: https://npmjs.org/package/range-parser | ||
[node-version-image]: https://img.shields.io/node/v/range-parser.svg | ||
[node-version-url]: https://nodejs.org/endownload | ||
[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg | ||
[npm-version-image]: https://badgen.net/npm/v/range-parser | ||
[travis-image]: https://badgen.net/travis/jshttp/range-parser/master | ||
[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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8457
130
85
10