commit
This commit is contained in:
parent
a15c733e45
commit
2a5130cbda
2838 changed files with 288613 additions and 0 deletions
19
node_modules/@tokenizer/token/README.md
generated
vendored
Normal file
19
node_modules/@tokenizer/token/README.md
generated
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
[](https://www.npmjs.com/package/@tokenizer/token)
|
||||
[](https://npmcharts.com/compare/@tokenizer/token?interval=30)
|
||||
|
||||
# @tokenizer/token
|
||||
|
||||
TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token.
|
||||
|
||||
## Licence
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2020 Borewit
|
||||
|
||||
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.
|
||||
|
30
node_modules/@tokenizer/token/index.d.ts
generated
vendored
Normal file
30
node_modules/@tokenizer/token/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Read-only token
|
||||
* See https://github.com/Borewit/strtok3 for more information
|
||||
*/
|
||||
export interface IGetToken<Value, Array extends Uint8Array = Uint8Array> {
|
||||
|
||||
/**
|
||||
* Length of encoded token in bytes
|
||||
*/
|
||||
len: number;
|
||||
|
||||
/**
|
||||
* Decode value from buffer at offset
|
||||
* @param array - Uint8Array to read the decoded value from
|
||||
* @param offset - Decode offset
|
||||
* @return decoded value
|
||||
*/
|
||||
get(array: Array, offset: number): Value;
|
||||
}
|
||||
|
||||
export interface IToken<Value, Array extends Uint8Array = Uint8Array> extends IGetToken<Value, Array> {
|
||||
/**
|
||||
* Encode value to buffer
|
||||
* @param array - Uint8Array to write the encoded value to
|
||||
* @param offset - Buffer write offset
|
||||
* @param value - Value to decode of type T
|
||||
* @return offset plus number of bytes written
|
||||
*/
|
||||
put(array: Array, offset: number, value: Value): number
|
||||
}
|
33
node_modules/@tokenizer/token/package.json
generated
vendored
Normal file
33
node_modules/@tokenizer/token/package.json
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "@tokenizer/token",
|
||||
"version": "0.3.0",
|
||||
"description": "TypeScript definition for strtok3 token",
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"files": [
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"token",
|
||||
"interface",
|
||||
"tokenizer",
|
||||
"TypeScript"
|
||||
],
|
||||
"author": {
|
||||
"name": "Borewit",
|
||||
"url": "https://github.com/Borewit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Borewit/tokenizer-token.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Borewit/tokenizer-token/issues"
|
||||
},
|
||||
"typeScriptVersion": "3.0",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/node": "^13.1.0"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue