aswi2020vldc-gitlab/templetes/node_modules/es-abstract/2015/EnumerableOwnNames.js @ ae1ff627
1 | 3a515b92 | cagy | 'use strict'; |
---|---|---|---|
2 | |||
3 | var GetIntrinsic = require('../GetIntrinsic'); |
||
4 | |||
5 | var $TypeError = GetIntrinsic('%TypeError%'); |
||
6 | |||
7 | var keys = require('object-keys'); |
||
8 | |||
9 | var Type = require('./Type'); |
||
10 | |||
11 | // https://www.ecma-international.org/ecma-262/6.0/#sec-enumerableownnames
|
||
12 | |||
13 | module.exports = function EnumerableOwnNames(O) { |
||
14 | if (Type(O) !== 'Object') { |
||
15 | throw new $TypeError('Assertion failed: Type(O) is not Object'); |
||
16 | }
|
||
17 | |||
18 | return keys(O); |
||
19 | };
|