Page MenuHomec4science

_to_primitive.js
No OneTemporary

File Metadata

Created
Sat, Jan 25, 01:20

_to_primitive.js

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _toPrimitive;
}
});
var _typeOfMjs = /*#__PURE__*/ _interopRequireDefault(require("./_type_of.js"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
function _toPrimitive(input, hint) {
if ((0, _typeOfMjs.default)(input) !== "object" || input === null) return input;
var prim = input[Symbol.toPrimitive];
if (prim !== undefined) {
var res = prim.call(input, hint || "default");
if ((0, _typeOfMjs.default)(res) !== "object") return res;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (hint === "string" ? String : Number)(input);
}

Event Timeline