assign-non-enumerable
assignNonEnumerable(target, source)
A simplified version of Object.assign, which only accepts a single source argument and makes all assigned properties non enumerable and writable.
var assignNonEnumerable = require("can-util/js/assign-non-enumerable/assign-non-enumerable");
var obj = {};
assignNonEnumerable(obj, {
foo: "bar"
});
console.log(obj.foo); // -> "bar"
Parameters
- target
{Object}:The destination object. This object's properties will be mutated based on the object provided as
source. - source
{Object}:The source object whose own properties will be applied to
target.
Returns
{Object}:
Returns the target argument.