MCPcopy Index your code
hub / github.com/simstudioai/sim / getNumber

Function getNumber

apps/sim/tools/trello/shared.ts:34–47  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

32}
33
34function getNumber(value: unknown): number {
35 if (typeof value === 'number' && Number.isFinite(value)) {
36 return value
37 }
38
39 if (typeof value === 'string' && value.trim().length > 0) {
40 const parsed = Number(value)
41 if (Number.isFinite(parsed)) {
42 return parsed
43 }
44 }
45
46 return 0
47}
48
49function getOptionalNumber(value: unknown): number | null {
50 if (typeof value === 'number' && Number.isFinite(value)) {

Callers 2

mapTrelloListFunction · 0.70
mapTrelloChecklistFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected