the-forest/client/node_modules/@babel/runtime/helpers/toPrimitive.js
2024-09-17 20:35:18 -04:00

12 lines
494 B
JavaScript

var _typeof = require("./typeof.js")["default"];
function toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;