range-parser/000755 001751 000177 0000000000 14522377323015147 5ustar00runner000000 000000 1452237732314522377323range-parser/LICENSE000644 001751 000177 0000002165 14522377323016160 0ustar00runner000000 000000 1452237732314522377323 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE range-parser/README.md000644 001751 000177 0000003150 14522377323016426 0ustar00runner000000 000000 1452243756114522377323# Installation > `npm install --save @types/range-parser` # Summary This package contains type definitions for range-parser (https://github.com/jshttp/range-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser/index.d.ts) ````ts /** * When ranges are returned, the array has a "type" property which is the type of * range that is required (most commonly, "bytes"). Each array element is an object * with a "start" and "end" property for the portion of the range. * * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise. */ declare function RangeParser( size: number, str: string, options?: RangeParser.Options, ): RangeParser.Result | RangeParser.Ranges; declare namespace RangeParser { interface Ranges extends Array { type: string; } interface Range { start: number; end: number; } interface Options { /** * The "combine" option can be set to `true` and overlapping & adjacent ranges * will be combined into a single range. */ combine?: boolean | undefined; } type ResultUnsatisfiable = -1; type ResultInvalid = -2; type Result = ResultUnsatisfiable | ResultInvalid; } export = RangeParser; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 09:09:39 GMT * Dependencies: none # Credits These definitions were written by [Tomek Łaziuk](https://github.com/tlaziuk). range-parser/index.d.ts000644 001751 000177 0000002005 14522377323017045 0ustar00runner000000 000000 1452237732314522377323/** * When ranges are returned, the array has a "type" property which is the type of * range that is required (most commonly, "bytes"). Each array element is an object * with a "start" and "end" property for the portion of the range. * * @returns `-1` when unsatisfiable and `-2` when syntactically invalid, ranges otherwise. */ declare function RangeParser( size: number, str: string, options?: RangeParser.Options, ): RangeParser.Result | RangeParser.Ranges; declare namespace RangeParser { interface Ranges extends Array { type: string; } interface Range { start: number; end: number; } interface Options { /** * The "combine" option can be set to `true` and overlapping & adjacent ranges * will be combined into a single range. */ combine?: boolean | undefined; } type ResultUnsatisfiable = -1; type ResultInvalid = -2; type Result = ResultUnsatisfiable | ResultInvalid; } export = RangeParser; range-parser/package.json000644 001751 000177 0000001445 14522377323017442 0ustar00runner000000 000000 1452243756114522377323{ "name": "@types/range-parser", "version": "1.2.7", "description": "TypeScript definitions for range-parser", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/range-parser", "license": "MIT", "contributors": [ { "name": "Tomek Łaziuk", "githubUsername": "tlaziuk", "url": "https://github.com/tlaziuk" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/range-parser" }, "scripts": {}, "dependencies": {}, "typesPublisherContentHash": "85ed88e3afe8da85360c400901b67e99a7c6690c6376c5ab8939ae9dee4b0a93", "typeScriptVersion": "4.5" }