Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Assign.js - dependency-free very minimal assign function
========
Assign.js is an extremely tiny helper function to assign objects
Command line:
npm install assign.js --save
In JS code:
var assigner = require('assign.js');
...
assigner.assign( obj1, obj2[, obj3[, objN]] );
Respect will force assignment if property already exist
assigner.validvalues( true )
Assign.js will set only non 'null'-like values from source object. False by default.
assigner.respect( true )
Assign.js will respect the already existing non-empty values of keys. False by default.
assigner.recursive( true )
Tells assigner to walk recursively when assigning objects. Yes by default.
assigner.attributes( [] )
Defines the list of keys allowed to be assigned.
assigner.attributes( [] )
Defines the list of keys excluded to be assigned.
assigner.primitives( [] )
Defines the list of keys considered as values to be assigned preventing to recursively processed.
assigner.blueprinting( true )
If it is set to 'true', Assign.js will consider the keyset of the destination object as reference otherwise key-set will be read from the object assigned from.
assigner.forceful( true )
This option will follow the path of the source object eventually overwriting the one found in the dest object.
assigner.pick(object, properties)
This will project the object into a new object possessing the properties defined by the 2nd parameter which might be given as array or varargs as well.
assigner.cloneObject( source )
This created a cloned object from the source copied recursively.
FAQs
Tiny libary to assign objects
The npm package assign.js receives a total of 1,779 weekly downloads. As such, assign.js popularity was classified as popular.
We found that assign.js 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.