ToObject.js 317 B

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