main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
494 bytes
|
Line | |
---|
1 | var _typeof = require("./typeof.js")["default"];
|
---|
2 | function toPrimitive(t, r) {
|
---|
3 | if ("object" != _typeof(t) || !t) return t;
|
---|
4 | var e = t[Symbol.toPrimitive];
|
---|
5 | if (void 0 !== e) {
|
---|
6 | var i = e.call(t, r || "default");
|
---|
7 | if ("object" != _typeof(i)) return i;
|
---|
8 | throw new TypeError("@@toPrimitive must return a primitive value.");
|
---|
9 | }
|
---|
10 | return ("string" === r ? String : Number)(t);
|
---|
11 | }
|
---|
12 | module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; |
---|
Note:
See
TracBrowser
for help on using the repository browser.