Package Exports
- content-range
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (content-range) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
content-range
Content-range header formatter.
Install
npm install content-range
Usage
var contentRange = require('content-range');
var header = contentRange.format({
name: 'items',
offset: 10,
limit: 20,
count: 100
});
console.log(header); // items 10-29/100
contentRange.format(obj)
Format a content-range header.
var header = contentRange.format({
name: 'items',
offset: 10,
limit: 20,
count: 100
});
console.log(header); // items 10-29/100
contentRange.parse(str)
Parse a content-range header.
var parts = contentRange.parse('items 10-29/100');
console.log(parts); // { name: 'items', start: 10, end: 29, count: 100 }
License
MIT