🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

range-parser

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

range-parser

Range header field string parser

1.2.1
latest
Version published
Weekly downloads
42M
6.14%
Maintainers
4
Weekly downloads
 
Created

What is range-parser?

The range-parser package is a utility for parsing HTTP range header fields. It's useful for handling requests for specific ranges of data, which is particularly relevant for serving large files in smaller chunks, such as videos or large documents.

What are range-parser's main functionalities?

Parse Range Header

This feature allows you to parse the 'Range' header from HTTP requests. It takes the size of the file and the range header as arguments and returns an array of ranges, or an error code if the range is unsatisfiable or syntactically invalid.

const rangeParser = require('range-parser');
const rangeHeader = 'bytes=0-499';
const fileSize = 1000;
const parsedRanges = rangeParser(fileSize, rangeHeader);

Other packages similar to range-parser

FAQs

Package last updated on 11 May 2019

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