Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokenizer/range

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenizer/range - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

4

lib/index.d.ts
import type { IRangeRequestClient, IRangeRequestConfig } from './types.js';
import type { ITokenizer } from 'strtok3';
import type { IRandomAccessTokenizer } from 'strtok3';
export type { IRangeRequestClient, IRangeRequestResponse, IContentRangeType, IHeadRequestInfo, IRangeRequestConfig } from './types.js';

@@ -12,2 +12,2 @@ export { parseContentRange } from './range-request-tokenizer.js';

*/
export declare function tokenizer(rangeRequestClient: IRangeRequestClient, config?: IRangeRequestConfig): Promise<ITokenizer>;
export declare function tokenizer(rangeRequestClient: IRangeRequestClient, config?: IRangeRequestConfig): Promise<IRandomAccessTokenizer>;

@@ -1,2 +0,2 @@

import { AbstractTokenizer, type IReadChunkOptions } from 'strtok3';
import { AbstractTokenizer, type IRandomAccessTokenizer, type IReadChunkOptions, type IRandomAccessFileInfo } from 'strtok3';
import type { IContentRangeType, IHeadRequestInfo, IRangeRequestClient } from './types.js';

@@ -15,7 +15,9 @@ interface IRangeRequestTokenizerOptions {

*/
export declare class RangeRequestTokenizer extends AbstractTokenizer {
export declare class RangeRequestTokenizer extends AbstractTokenizer implements IRandomAccessTokenizer {
private rangeRequestClient;
private options;
private _fileData;
readonly fileInfo: IRandomAccessFileInfo;
constructor(rangeRequestClient: IRangeRequestClient, options: IRangeRequestTokenizerOptions);
setPosition(position: number): void;
/**

@@ -43,2 +45,3 @@ * Read portion from stream

private loadRange;
supportsRandomAccess(): boolean;
}

@@ -45,0 +48,0 @@ export declare function roundRange(range: [number, number], minimumChunkSize: number): [number, number];

@@ -17,2 +17,3 @@ import { AbstractTokenizer } from 'strtok3';

this.options = options;
this.fileInfo = options.fileInfo;
if (Number.isNaN(options.minimumChunkSize)) {

@@ -26,2 +27,5 @@ throw new Error('minimumChunkSize must be a number');

}
setPosition(position) {
this.position = position;
}
/**

@@ -118,2 +122,5 @@ * Read portion from stream

}
supportsRandomAccess() {
return false;
}
}

@@ -120,0 +127,0 @@ export function roundRange(range, minimumChunkSize) {

@@ -1,2 +0,2 @@

import type { IFileInfo } from 'strtok3';
import type { IRandomAccessFileInfo } from 'strtok3';
export interface IRangeRequestConfig {

@@ -26,3 +26,3 @@ abortSignal?: AbortSignal;

*/
export interface IHeadRequestInfo extends IFileInfo {
export interface IHeadRequestInfo extends IRandomAccessFileInfo {
/**

@@ -29,0 +29,0 @@ * Accept partial requests

{
"name": "@tokenizer/range",
"version": "0.10.0",
"version": "0.11.0",
"description": "Range-request tokenizer adapter",

@@ -63,21 +63,21 @@ "type": "module",

"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/chai": "^4.3.19",
"@biomejs/biome": "1.9.4",
"@types/chai": "^5.0.1",
"@types/debug": "^4.1.12",
"@types/mocha": "^10.0.7",
"@types/node": "^22.5.2",
"@types/mocha": "^10.0.10",
"@types/node": "^22.10.0",
"c8": "^10.1.2",
"chai": "^5.1.1",
"del-cli": "^5.1.0",
"chai": "^5.1.2",
"del-cli": "^6.0.0",
"global": "^4.4.0",
"mocha": "^10.7.3",
"music-metadata": "^10.3.1",
"mocha": "^10.8.2",
"music-metadata": "^10.6.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.7.2"
},
"dependencies": {
"debug": "^4.3.6",
"strtok3": "^9.0.0"
"debug": "^4.3.7",
"strtok3": "^9.1.1"
},
"packageManager": "yarn@4.3.1"
}
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