one
Version:
One is a React framework for web, iOS, and Android apps.
1 lines • 1.05 kB
Source Map (JSON)
{"version":3,"file":"validate.js","names":[],"sources":["esm/platform/motion/validate.js"],"sourcesContent":["function validateListener(sensor, intervalMs, onReading, onError) {\n if (![\"accelerometer\", \"gyroscope\", \"magnetometer\", \"deviceMotion\"].includes(sensor))\n throw new TypeError(\"Motion.addListener requires a supported sensor\");\n if (!Number.isFinite(intervalMs) || intervalMs < 0 || intervalMs > 1e3)\n throw new RangeError(\"Motion.addListener intervalMs must be between 0 and 1000\");\n if (typeof onReading !== \"function\" || typeof onError !== \"function\")\n throw new TypeError(\"Motion.addListener requires reading and error callbacks\");\n}\nexport {\n validateListener\n};\n//# sourceMappingURL=validate.js.map\n"],"mappings":";AAAA,SAAS,iBAAiB,QAAQ,YAAY,WAAW,SAAS;CAChE,IAAI,CAAC;EAAC;EAAiB;EAAa;EAAgB;CAAc,CAAC,CAAC,SAAS,MAAM,GACjF,MAAM,IAAI,UAAU,gDAAgD;CACtE,IAAI,CAAC,OAAO,SAAS,UAAU,KAAK,aAAa,KAAK,aAAa,KACjE,MAAM,IAAI,WAAW,0DAA0D;CACjF,IAAI,OAAO,cAAc,cAAc,OAAO,YAAY,YACxD,MAAM,IAAI,UAAU,yDAAyD;AACjF"}