ToObject.js 329 B

1234567891011121314
  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $Object = GetIntrinsic('%Object%');
  4. var RequireObjectCoercible = require('./RequireObjectCoercible');
  5. // https://262.ecma-international.org/6.0/#sec-toobject
  6. module.exports = function ToObject(value) {
  7. RequireObjectCoercible(value);
  8. return $Object(value);
  9. };