Files
react-native-devtools-frontend/node_modules/range-parser
Paul Lewis 75090cfd93 Reland "Updates node_modules and update script"
This is a reland of 4df552c652

Original change's description:
> Updates node_modules and update script
> 
> Change-Id: I3fcf49bc416301a030d298cfc48c448bfeba4335
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1878808
> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Paul Lewis <aerotwist@chromium.org>

Change-Id: I97d1442c21420488fadde3f17f67cd4e3b959be6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1880030
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
2019-10-25 13:19:06 +00:00
..
2019-10-21 08:08:56 +02:00
2019-10-21 08:08:56 +02:00
2019-10-21 08:08:56 +02:00
2019-10-21 08:08:56 +02:00

range-parser

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

Range header field parser.

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install range-parser

API

var parseRange = require('range-parser')

parseRange(size, header, options)

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 unsatisfiable range
// parse header from request
var range = parseRange(size, 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
  })
}

Options

These properties are accepted in the options object.

combine

Specifies if overlapping & adjacent ranges should be combined, defaults to false. When true, ranges will be combined and returned as if they were specified that way in the header.

parseRange(100, 'bytes=50-55,0-10,5-10,56-60', { combine: true })
// => [
//      { start: 0,  end: 10 },
//      { start: 50, end: 60 }
//    ]

License

MIT