MCPcopy Create free account
hub / github.com/CoderLine/alphaTab / _parseIntSafe

Method _parseIntSafe

packages/alphatab/src/importer/GpifParser.ts:332–342  ·  view source on GitHub ↗
(text: string | undefined, fallback: number)

Source from the content-addressed store, hash-verified

330 }
331
332 private static _parseIntSafe(text: string | undefined, fallback: number) {
333 if (!text) {
334 return fallback;
335 }
336
337 const i = Number.parseInt(text, 10);
338 if (!Number.isNaN(i)) {
339 return i;
340 }
341 return fallback;
342 }
343
344 private static _parseFloatSafe(text: string | undefined, fallback: number) {
345 if (!text) {

Callers 15

_parseScoreNodeMethod · 0.80
_parseAutomationMethod · 0.80
_parseTrackMethod · 0.80
_parseNotationPatchMethod · 0.80
_parseInstrumentSetMethod · 0.80
_parseArticulationMethod · 0.80
_parseStaffPropertyMethod · 0.80
_parseLyricsLineMethod · 0.80
_parseTrackPropertyMethod · 0.80
_parseGeneralMidiMethod · 0.80

Calls 2

parseIntMethod · 0.80
isNaNMethod · 0.80

Tested by

no test coverage detected