MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / timeConverter

Function timeConverter

packages/core/ui/styling/converters.ts:12–19  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

10});
11
12export function timeConverter(value: string): number {
13 let result = parseFloat(value);
14 if (value.indexOf('ms') === -1) {
15 result = result * 1000;
16 }
17
18 return Math.max(0.0, result);
19}
20
21export function animationTimingFunctionConverter(value: string): any {
22 return value ? STYLE_CURVE_MAP[value] || parseCubicBezierCurve(value) : CoreTypes.AnimationCurve.ease;

Callers 1

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected