own-all
Turns inherited properties into owned properties.
Returns a new object. Does not modify the original.
Installation
Requires Node.js 6.0.0 or above.
npm i own-all
API
The module exports a single function.
Parameter
obj
(object): The object which may possess owned and/or inherited properties.
Return Value
A new object which owns all of the properties, both owned and inherited, of obj
.
Example
const ownAll = Reflect /*[ 'a', 'constructor', '__defineGetter__', '__defineSetter__', 'hasOwnProperty', '__lookupGetter__', '__lookupSetter__', 'isPrototypeOf', 'propertyIsEnumerable', 'toString', 'valueOf', '__proto__', 'toLocaleString']*/ // If you only want enumerable properties, use `Object.keys()` etc:Object // ['a']