MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / float

Method float

packages/core/css-value/reworkcss-value.ts:79–86  ·  view source on GitHub ↗

Float tokens, possibly with unit

()

Source from the content-addressed store, hash-verified

77
78 /** Float tokens, possibly with unit */
79 private float(): NumberToken | undefined {
80 const m = /^(((?:[-+]?\d+)?\.\d+)(\S+)?) */.exec(this.str);
81 if (!m) return;
82 this.skip(m);
83 const n = parseFloat(m[2]);
84 const u = m[3] || '';
85 return { type: 'number', string: m[1], unit: u, value: n };
86 }
87
88 /** Number tokens, either float or int */
89 private number(): NumberToken | undefined {

Callers 1

numberMethod · 0.95

Calls 1

skipMethod · 0.95

Tested by

no test coverage detected