The object whose properties' enumerable property will be set to true.
Rest
...properties: string[]void
const obj = { a: 1, b: 2, c: 3 };
setEnumerable(obj, 'a', 'b');
Object.keys(obj);;
//=> ['a', 'b']
This function uses Object.defineProperty
to set the enumerable property.
Will throw an error if any of the specified properties do not exist on the object.
Generated using TypeDoc
Sets the enumerable property of the specified properties of an object to true.