ToObject.js 334 B

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