Version 1
[yaffs-website] / node_modules / core-js / library / modules / _date-to-primitive.js
diff --git a/node_modules/core-js/library/modules/_date-to-primitive.js b/node_modules/core-js/library/modules/_date-to-primitive.js
new file mode 100644 (file)
index 0000000..561079a
--- /dev/null
@@ -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