New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parse-content-range-header

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-content-range-header

Parses a Content-Range header and returns total number, start and end indexes of the current page records

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
increased by140%
Maintainers
1
Weekly downloads
 
Created
Source

parse-content-range-header

Parses an HTTP Content-Range header and returns response range information.

Complements parse-link-header and allows for missing range unit for compatibilitty with headers generated by hapi-pagination

Installation

npm install parse-content-range-header

Usage

const parse = require('parse-content-range-header');

const contentRange = 'items 0-19/30';
console.log(parse(contentRange));
{
    unit: 'items',
    first: 0,
    last: 19,
    length: 30
}

Keywords

FAQs

Package last updated on 12 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc