aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/modules/_date-to-primitive.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/modules/_date-to-primitive.js')
-rw-r--r--node_modules/core-js/modules/_date-to-primitive.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/core-js/modules/_date-to-primitive.js b/node_modules/core-js/modules/_date-to-primitive.js
new file mode 100644
index 000000000..561079a1b
--- /dev/null
+++ b/node_modules/core-js/modules/_date-to-primitive.js
@@ -0,0 +1,9 @@
+'use strict';
+var anObject = require('./_an-object')
+ , toPrimitive = require('./_to-primitive')
+ , NUMBER = 'number';
+
+module.exports = function(hint){
+ if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint');
+ return toPrimitive(anObject(this), hint != NUMBER);
+}; \ No newline at end of file