mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
5 lines
163 B
TypeScript
5 lines
163 B
TypeScript
export * as Token from "./token.js"
|
|
|
|
const CHARS_PER_TOKEN = 4
|
|
|
|
export const estimate = (input: string) => Math.max(0, Math.round(input.length / CHARS_PER_TOKEN))
|