1.0.0 • Published 10 years ago
http-content-range-format v1.0.0
http-content-range-format
Format HTTP Content-Range headers, RFC7233 compilant.
Install
$ npm install http-content-range-format
Usage
format({
unit: 'items',
first: 0,
last: 9,
length: 100
});
// 'items 0-9/100'
API
.format(obj)
format({ unit: 'items', first: 0, last: 9, length: 100 })
// items 0-9/100
format({ unit: 'items', first: 0, last: 9 })
// items 0-9/*
format({ unit: 'items', length: 100 })
// items */100
License
MIT
1.0.0
10 years ago