| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | 'use strict'; |
| 2 | |||||
| 3 | var GetIntrinsic = require('get-intrinsic'); | ||||
| 4 | |||||
| 5 | var $TypeError = GetIntrinsic('%TypeError%'); | ||||
| 6 | |||||
| 7 | var keys = require('object-keys'); | ||||
| 8 | |||||
| 9 | var Type = require('./Type'); | ||||
| 10 | |||||
| 11 | // https://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 | }; | ||||