UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

1 lines • 1.28 kB
{"version":3,"file":"validate.js","names":[],"sources":["esm/platform/pedometer/validate.js"],"sourcesContent":["function assertStepCountListener(listener) {\n if (typeof listener !== \"function\") {\n throw new Error(\"Pedometer.watchStepCount: listener must be a function\");\n }\n}\nfunction assertStepCountRange(start, end) {\n if (!(start instanceof Date) || !(end instanceof Date)) {\n throw new Error(\"Pedometer.getStepCount: start and end must be Dates\");\n }\n if (!Number.isFinite(start.getTime()) || !Number.isFinite(end.getTime())) {\n throw new Error(\"Pedometer.getStepCount: start and end must be valid dates\");\n }\n if (start.getTime() > end.getTime()) {\n throw new Error(\"Pedometer.getStepCount: start must precede end\");\n }\n}\nexport {\n assertStepCountListener,\n assertStepCountRange\n};\n//# sourceMappingURL=validate.js.map\n"],"mappings":";AAAA,SAAS,wBAAwB,UAAU;CACzC,IAAI,OAAO,aAAa,YAAY;EAClC,MAAM,IAAI,MAAM,uDAAuD;CACzE;AACF;AACA,SAAS,qBAAqB,OAAO,KAAK;CACxC,IAAI,EAAE,iBAAiB,SAAS,EAAE,eAAe,OAAO;EACtD,MAAM,IAAI,MAAM,qDAAqD;CACvE;CACA,IAAI,CAAC,OAAO,SAAS,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,SAAS,IAAI,QAAQ,CAAC,GAAG;EACxE,MAAM,IAAI,MAAM,2DAA2D;CAC7E;CACA,IAAI,MAAM,QAAQ,IAAI,IAAI,QAAQ,GAAG;EACnC,MAAM,IAAI,MAAM,gDAAgD;CAClE;AACF"}