http-range-parse
Parse HTTP Range headers, RFC7233 compilant.
Install
$ npm install http-range-parse
Usage
var parse = ; console
API
.parse(str)
Parse the given Range header. The returned object contains the range unit
,
and the requested range.
// { unit: 'items', first: 1, last: 2 } // { unit: 'items', suffix: 5 } // { unit: 'items', first: 1 } // { unit: 'items', ranges: [{ first: 1, last: 2 }, { first: 3, last: 4 }] }
License
MIT