aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/internals/date-to-primitive.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/internals/date-to-primitive.js')
-rw-r--r--node_modules/core-js/internals/date-to-primitive.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/core-js/internals/date-to-primitive.js b/node_modules/core-js/internals/date-to-primitive.js
new file mode 100644
index 0000000..fc334f1
--- /dev/null
+++ b/node_modules/core-js/internals/date-to-primitive.js
@@ -0,0 +1,9 @@
+'use strict';
+var anObject = require('../internals/an-object');
+var toPrimitive = require('../internals/to-primitive');
+
+module.exports = function (hint) {
+ if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
+ throw TypeError('Incorrect hint');
+ } return toPrimitive(anObject(this), hint !== 'number');
+};