![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Assign property objects onto other objects, recursively
Footprint for assignment
sits at around 400 bytes browserified, minified, and gzipped.
npm install assignment --save
assignment(a, b, c, ...)
Assigns every property of b
onto a
. If the an object already exists on a
that has one of b
's properties, then assignment(a.prop, b.prop)
will assign all child properties of b.prop
onto a.prop
. This happens recursively.
Returns a
.
It doesn't matter how many objects you hand to assignment
, they will all be collapsed into the first one.
assignment(
{ name: 'mordecai' },
{ name: 'eileen' },
{ name: 'rigby' }
);
// <- { name: 'rigby' }
Object's get replaced recursively, property by property. Note that for any given property prop
, you'll get back whatever the prototype was for the first prop
that existed in a
.
assignment(
{ character: { name: 'mordecai' } },
{ character: { color: 'red' } },
{ character: { name: 'margaret' } }
);
// <- { character: { name: 'margaret', color: 'red' } }
Note that arrays don't receive any special treatment. Typically, you want arrays to be replaced.
assignment(
{ characters: ['mordecai', 'margaret'] },
{ characters: ['rigby', 'eileen'] }
);
// <- { characters: ['rigby', 'eileen'] }
MIT
FAQs
Assign property objects onto other objects, recursively
The npm package assignment receives a total of 31,763 weekly downloads. As such, assignment popularity was classified as popular.
We found that assignment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.