ToPrimitive.js 282 B

123456789101112
  1. 'use strict';
  2. var toPrimitive = require('es-to-primitive/es2015');
  3. // https://262.ecma-international.org/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. };