UNPKG

tokenx

Version:

Fast token estimation with 95%+ average accuracy, 2kB minified and gzipped

70 lines • 1.63 kB
{ "name": "tokenx", "type": "module", "version": "2.2.1", "description": "Fast token estimation with 95%+ average accuracy, 2kB minified and gzipped", "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", "cli", "llm", "token", "tokenizer", "estimation", "tiktoken", "anthropic", "openai" ], "sideEffects": false, "exports": { ".": { "types": "./dist/index.d.mts", "default": "./dist/index.mjs" } }, "types": "./dist/index.d.mts", "bin": { "tokenx": "bin/tokenx.mjs" }, "files": [ "bin", "dist" ], "engines": { "node": ">=24" }, "devDependencies": { "@antfu/eslint-config": "^10.0.0", "@types/node": "^26.6.6", "ansis": "^4.5.0", "automd": "^0.4.3", "bumpp": "^12.3.0", "eslint": "^10.14.0", "eslint-flat-config-utils": "^3.2.0", "gpt-tokenizer": "^4.1.2", "tsdown": "^0.23.7", "typescript": "^6.0.3", "utilful": "^3.6.0", "vitest": "^5.1.0" }, "scripts": { "build": "tsdown", "dev": "node ./src/cli/entry.ts --help", "bench": "node scripts/generate-bench.ts && automd", "bench:png": "node scripts/render-bench.ts", "lint": "eslint .", "lint:fix": "eslint . --fix", "test": "vitest", "test:types": "tsc --noEmit", "release": "bumpp" } }