ToPrimitive.js 287 B

123456789101112
  1. 'use strict';
  2. var toPrimitive = require('es-to-primitive/es2015');
  3. // https://ecma-international.org/ecma-262/6.0/#sec-toprimitive
  4. module.exports = function ToPrimitive(input) {
  5. if (arguments.length > 1) {
  6. return toPrimitive(input, arguments[1]);
  7. }
  8. return toPrimitive(input);
  9. };