one
Version:
One is a React framework for web, iOS, and Android apps.
29 lines (26 loc) • 843 B
JavaScript
import { Device as Device$1 } from "./unavailable.mjs";
const Device = Object.freeze({
getInfo: async () => {
if (typeof window === "undefined") return Device$1.getInfo();
return {
model: "",
systemName: navigator.platform,
systemVersion: "",
interfaceIdiom: "unspecified",
isSimulator: false
};
},
getLocalizationInfo: async () => {
if (typeof window === "undefined") return Device$1.getLocalizationInfo();
const options = new Intl.DateTimeFormat(navigator.language).resolvedOptions();
return {
localeIdentifier: options.locale,
preferredLanguages: [...navigator.languages],
calendarIdentifier: options.calendar,
timeZoneIdentifier: options.timeZone,
timeZoneOffsetSeconds: -(/* @__PURE__ */ new Date()).getTimezoneOffset() * 60
};
}
});
export { Device };
//# sourceMappingURL=index.mjs.map