tokenx
Version:
Fast token estimation at 94% accuracy of a full tokenizer in a 2kB bundle
60 lines (59 loc) • 1.4 kB
JSON
{
"name": "tokenx",
"type": "module",
"version": "1.2.1",
"packageManager": "pnpm@10.21.0",
"description": "Fast token estimation at 94% accuracy of a full tokenizer in a 2kB bundle",
"author": "Johann Schopplich <hello@johannschopplich.com>",
"license": "MIT",
"homepage": "https://github.com/johannschopplich/tokenx#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/johannschopplich/tokenx.git"
},
"bugs": {
"url": "https://github.com/johannschopplich/tokenx/issues"
},
"keywords": [
"ai",
"llm",
"token",
"tokenizer",
"estimation",
"tiktoken",
"anthropic",
"openai"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsdown",
"automd": "tsx scripts/generate-bench.ts && automd",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest",
"test:types": "tsc --noEmit",
"release": "bumpp"
},
"devDependencies": {
"@antfu/eslint-config": "^6.2.0",
"@types/node": "^24.10.0",
"automd": "^0.4.2",
"bumpp": "^10.3.1",
"eslint": "^9.39.1",
"gpt-tokenizer": "^3.4.0",
"tsdown": "^0.15.12",
"tsx": "^4.20.6",
"typescript": "^5.9.3",
"vitest": "^4.0.8"
}
}