MCPcopy Create free account
hub / github.com/LibPDF-js/core / getNumber

Method getNumber

src/text/text-extractor.ts:325–331  ·  view source on GitHub ↗

* Get a number from a content token.

(token: ContentToken | undefined)

Source from the content-addressed store, hash-verified

323 * Get a number from a content token.
324 */
325 private getNumber(token: ContentToken | undefined): number {
326 if (token?.type === "number") {
327 return token.value;
328 }
329
330 return 0;
331 }
332
333 /**
334 * Get a name from a content token (strips leading /).

Callers 3

processOperationMethod · 0.95
handleCmMethod · 0.95
handleTfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected