MCPcopy Create free account
hub / github.com/arctic-cli/interface / estimate

Function estimate

packages/arctic/src/util/token.ts:4–6  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

2 const CHARS_PER_TOKEN = 4
3
4 export function estimate(input: string) {
5 return Math.max(0, Math.round((input || "").length / CHARS_PER_TOKEN))
6 }
7}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected