diff options
Diffstat (limited to 'node_modules/@tokenizer')
-rw-r--r-- | node_modules/@tokenizer/token/README.md | 6 | ||||
-rw-r--r-- | node_modules/@tokenizer/token/index.d.ts | 29 | ||||
-rw-r--r-- | node_modules/@tokenizer/token/package.json | 61 |
3 files changed, 96 insertions, 0 deletions
diff --git a/node_modules/@tokenizer/token/README.md b/node_modules/@tokenizer/token/README.md new file mode 100644 index 0000000..ceb9281 --- /dev/null +++ b/node_modules/@tokenizer/token/README.md @@ -0,0 +1,6 @@ +[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token) +[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30) + +# @tokenizer/token + +TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token. diff --git a/node_modules/@tokenizer/token/index.d.ts b/node_modules/@tokenizer/token/index.d.ts new file mode 100644 index 0000000..828916e --- /dev/null +++ b/node_modules/@tokenizer/token/index.d.ts @@ -0,0 +1,29 @@ +/** + * Read-only token + * See https://github.com/Borewit/strtok3 for more information + */ +export interface IGetToken<T> { + + /** + * Length of encoded token in bytes + */ + len: number; + + /** + * Decode value from buffer at offset + * @param buffer - Buffer to read the decoded value from + * @param offset - Decode offset + * @return Decoded value + */ + get(buffer: Buffer, offset: number): T; +} + +export interface IToken<T> extends IGetToken<T> { + /** + * Encode value to buffer + * @param buffer - Buffer to write the encoded value to + * @param offset - Buffer write offset + * @param value - Value to decode of type T + */ + put(buffer: Buffer, offset: number, value: T): number +} diff --git a/node_modules/@tokenizer/token/package.json b/node_modules/@tokenizer/token/package.json new file mode 100644 index 0000000..11bc707 --- /dev/null +++ b/node_modules/@tokenizer/token/package.json @@ -0,0 +1,61 @@ +{ + "_from": "@tokenizer/token@^0.1.1", + "_id": "@tokenizer/token@0.1.1", + "_inBundle": false, + "_integrity": "sha512-XO6INPbZCxdprl+9qa/AAbFFOMzzwqYxpjPgLICrMD6C2FCw6qfJOPcBk6JqqPLSaZ/Qx87qn4rpPmPMwaAK6w==", + "_location": "/@tokenizer/token", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "@tokenizer/token@^0.1.1", + "name": "@tokenizer/token", + "escapedName": "@tokenizer%2ftoken", + "scope": "@tokenizer", + "rawSpec": "^0.1.1", + "saveSpec": null, + "fetchSpec": "^0.1.1" + }, + "_requiredBy": [ + "/strtok3", + "/token-types" + ], + "_resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.1.1.tgz", + "_shasum": "f0d92c12f87079ddfd1b29f614758b9696bc29e3", + "_spec": "@tokenizer/token@^0.1.1", + "_where": "/data/dev/Projets/FNS Electrode/Projets/FNS Electrode/node_modules/strtok3", + "author": { + "name": "Borewit", + "url": "https://github.com/Borewit" + }, + "bugs": { + "url": "https://github.com/Borewit/tokenizer-token/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "TypeScript definition for strtok3 token", + "devDependencies": { + "@types/node": "^13.1.0" + }, + "files": [ + "index.d.ts" + ], + "homepage": "https://github.com/Borewit/tokenizer-token#readme", + "keywords": [ + "token", + "interface", + "tokenizer", + "TypeScript" + ], + "license": "MIT", + "main": "", + "name": "@tokenizer/token", + "repository": { + "type": "git", + "url": "git+https://github.com/Borewit/tokenizer-token.git" + }, + "typeScriptVersion": "3.0", + "types": "index.d.ts", + "version": "0.1.1" +} |