make-enumerable
Make all the properties of an object enumerable. Optionally deep, shallow by default.
Install
Install with npm
$ npm i make-enumerable --save
Usage
var makeEnumerable = ;var delegate = ; var initial = { return val; } { return val; }; // make a copy of initial, and make properties non-enumerablevar obj = ;console // [function]console // [function]console; // {}console; // [] // now, let's make the properties enumerable again; console; // {upper: [function], lower: [function]}console; // ['upper', 'lower']
nested objects
To make properties on nested objects enumerable, pass true
as the second argument:
;
Related projects
- define-property: Define a non-enumerable property on an object.
- delegate-properties: Deep-clone properties from one object to another and make them non-enumerable, or make existing properties… more
- delegate-object: Copy properties from an object to another object, where properties with function values will be… more
- forward-object: Copy properties from an object to another object, where properties with function values will be… more
- mixin-deep: Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.
- mixin-object: Mixin the own and inherited properties of other objects onto the first object. Pass an… more
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 16, 2015.