MCPcopy Index your code
hub / github.com/jimp-dev/jimp / parseNumbersInObject

Function parseNumbersInObject

plugins/plugin-print/src/load-bitmap-font.ts:65–80  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

63
64// eslint-disable-next-line @typescript-eslint/no-explicit-any
65function parseNumbersInObject<T extends Record<string, any>>(obj: T) {
66 for (const key in obj) {
67 try {
68 // eslint-disable-next-line @typescript-eslint/no-explicit-any
69 (obj as any)[key] = parseInt(obj[key], 10);
70 } catch {
71 // do nothing
72 }
73
74 if (typeof obj[key] === "object") {
75 parseNumbersInObject(obj[key]);
76 }
77 }
78
79 return obj;
80}
81
82/**
83 *

Callers 1

loadBitmapFontDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…