MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / number

Method number

shared/rison.ts:106–110  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

104 return '!n';
105 }
106 static number(x: number) {
107 if (!Number.isFinite(x)) return '!n';
108 // strip '+' out of exponent, '-' is ok though
109 return String(x).replace(/\+/, '');
110 }
111 static object(x: Record<string, JSONValue> | null) {
112 if (x) {
113 // because typeof null === 'object'

Callers 4

registerCompilersToolFunction · 0.80
registerLibrariesToolFunction · 0.80
registerCompileToolFunction · 0.80
objectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected