UNPKG

etc-hooks

Version:
15 lines (14 loc) 607 B
function _type_of(obj) { "@swc/helpers - typeof"; return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } import { debounce } from "lodash-es"; function isNodeOrWeb() { var freeGlobal = (typeof global === "undefined" ? "undefined" : typeof global === "undefined" ? "undefined" : _type_of(global)) == "object" && global && global.Object === Object && global; var freeSelf = typeof self == "object" && self && self.Object === Object && self; return freeGlobal || freeSelf; } if (!isNodeOrWeb()) { global.Date = Date; } export { debounce };