source: imaps-frontend/node_modules/@babel/helpers/lib/helpers/toPrimitive.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 3 months ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 543 bytes
Line 
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = toPrimitive;
7function toPrimitive(input, hint) {
8 if (typeof input !== "object" || !input) return input;
9 var prim = input[Symbol.toPrimitive];
10 if (prim !== undefined) {
11 var res = prim.call(input, hint || "default");
12 if (typeof res !== "object") return res;
13 throw new TypeError("@@toPrimitive must return a primitive value.");
14 }
15 return (hint === "string" ? String : Number)(input);
16}
17
18//# sourceMappingURL=toPrimitive.js.map
Note: See TracBrowser for help on using the repository browser.