From 0f79e708bf07721b73ea41e5d341be08e8ea4dce Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 7 Mar 2021 18:29:17 +0100 Subject: Initial commit --- node_modules/strtok3/lib/BufferTokenizer.d.ts | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 node_modules/strtok3/lib/BufferTokenizer.d.ts (limited to 'node_modules/strtok3/lib/BufferTokenizer.d.ts') diff --git a/node_modules/strtok3/lib/BufferTokenizer.d.ts b/node_modules/strtok3/lib/BufferTokenizer.d.ts new file mode 100644 index 0000000..1dd6119 --- /dev/null +++ b/node_modules/strtok3/lib/BufferTokenizer.d.ts @@ -0,0 +1,37 @@ +/// +import { IFileInfo, IReadChunkOptions, ITokenizer } from './types'; +import { IGetToken, IToken } from '@tokenizer/token'; +export declare class BufferTokenizer implements ITokenizer { + private buffer; + fileInfo: IFileInfo; + position: number; + /** + * Construct BufferTokenizer + * @param buffer - Buffer to tokenize + * @param fileInfo - Pass additional file information to the tokenizer + */ + constructor(buffer: Buffer, fileInfo?: IFileInfo); + /** + * Read buffer from tokenizer + * @param buffer + * @param options - Read behaviour options + * @returns {Promise} + */ + readBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise; + /** + * Peek (read ahead) buffer from tokenizer + * @param buffer + * @param options - Read behaviour options + * @returns {Promise} + */ + peekBuffer(buffer: Buffer | Uint8Array, options?: IReadChunkOptions): Promise; + readToken(token: IGetToken, position?: number): Promise; + peekToken(token: IGetToken, position?: number): Promise; + readNumber(token: IToken): Promise; + peekNumber(token: IToken): Promise; + /** + * @return actual number of bytes ignored + */ + ignore(length: number): Promise; + close(): Promise; +} -- cgit