You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

@httpland/range-parser

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@httpland/range-parser - npm Package Compare versions

Comparing version

to
1.0.1-beta.1

4

esm/parse.js
// Copyright 2023-latest the httpland authors. All rights reserved. MIT license.
// This module is browser compatible.
import { isNotEmpty, isNumber, isString, isUndefined, trim } from "./deps.js";
const RangeSpecifierRe = /^(?<rangeUnit>([!#$%&'*+-.^_`|~A-Za-z0-9])+)=(?<rangeSet>((([0-9])+-(([0-9])+)?)|(-([0-9])+)|([\x21-\x2B\x2D-\x7E]+))((\x20|\t)*,(\x20|\t)*((([0-9])+-(([0-9])+)?)|(-([0-9])+)|([\x21-\x2B\x2D-\x7E]+)))*)$/;
const RangeSpecifierRe = /^(?<rangeUnit>([\w!#$%&'*+-.^`|~])+)=(?<rangeSet>(((\d)+-((\d)+)?)|(-(\d)+)|([\x21-\x2B\x2D-\x7E]+))([\t ]*,[\t ]*(((\d)+-((\d)+)?)|(-(\d)+)|([\x21-\x2B\x2D-\x7E]+)))*)$/;
var Msg;

@@ -50,3 +50,3 @@ (function (Msg) {

}
const RangeSpecRe = /^((?<firstPos>[0-9]+)-(?<lastPos>[0-9]+)?)$|^(-(?<suffixLength>[0-9]+))$|^(?<otherRange>[\x21-\x2B\x2D-\x7E]+)$/;
const RangeSpecRe = /^((?<firstPos>\d+)-(?<lastPos>\d+)?)$|^(-(?<suffixLength>\d+))$|^(?<otherRange>[\x21-\x2B\x2D-\x7E]+)$/;
export function parseRangeSpec(input) {

@@ -53,0 +53,0 @@ const result = RangeSpecRe.exec(input);

@@ -6,3 +6,3 @@ {

"name": "@httpland/range-parser",
"version": "1.0.0",
"version": "1.0.1-beta.1",
"description": "HTTP Range header field parser",

@@ -9,0 +9,0 @@ "keywords": [

@@ -7,3 +7,3 @@ "use strict";

const deps_js_1 = require("./deps.js");
const RangeSpecifierRe = /^(?<rangeUnit>([!#$%&'*+-.^_`|~A-Za-z0-9])+)=(?<rangeSet>((([0-9])+-(([0-9])+)?)|(-([0-9])+)|([\x21-\x2B\x2D-\x7E]+))((\x20|\t)*,(\x20|\t)*((([0-9])+-(([0-9])+)?)|(-([0-9])+)|([\x21-\x2B\x2D-\x7E]+)))*)$/;
const RangeSpecifierRe = /^(?<rangeUnit>([\w!#$%&'*+-.^`|~])+)=(?<rangeSet>(((\d)+-((\d)+)?)|(-(\d)+)|([\x21-\x2B\x2D-\x7E]+))([\t ]*,[\t ]*(((\d)+-((\d)+)?)|(-(\d)+)|([\x21-\x2B\x2D-\x7E]+)))*)$/;
var Msg;

@@ -56,3 +56,3 @@ (function (Msg) {

exports.parseRangesSpecifier = parseRangesSpecifier;
const RangeSpecRe = /^((?<firstPos>[0-9]+)-(?<lastPos>[0-9]+)?)$|^(-(?<suffixLength>[0-9]+))$|^(?<otherRange>[\x21-\x2B\x2D-\x7E]+)$/;
const RangeSpecRe = /^((?<firstPos>\d+)-(?<lastPos>\d+)?)$|^(-(?<suffixLength>\d+))$|^(?<otherRange>[\x21-\x2B\x2D-\x7E]+)$/;
function parseRangeSpec(input) {

@@ -59,0 +59,0 @@ const result = RangeSpecRe.exec(input);