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

Method int

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

Integer tokens, possibly with unit

()

Source from the content-addressed store, hash-verified

67
68 /** Integer tokens, possibly with unit */
69 private int(): NumberToken | undefined {
70 const m = /^(([-+]?\d+)(\S+)?) */.exec(this.str);
71 if (!m) return;
72 this.skip(m);
73 const n = parseInt(m[2], 10);
74 const u = m[3] || '';
75 return { type: 'number', string: m[1], unit: u, value: n };
76 }
77
78 /** Float tokens, possibly with unit */
79 private float(): NumberToken | undefined {

Callers 1

numberMethod · 0.95

Calls 1

skipMethod · 0.95

Tested by

no test coverage detected