Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Mutate keys and values in objects. Returns a new version of the object
npm install toxic --save
var toxic = require('toxic');
var mutatedObject = toxic({
key1: 'value1',
key2: 'value2'
}, {
mutator: function (val) {
return val + '...'
}
});
console.log(mutatedObject);
// OUTPUTS:
// {
// 'key1...': 'value1...',
// 'key2...': 'value2...'
// }
object
- The object to perform mutations on.options
mutator
- Function that gets passed the current key or value. Default returns the value, as is.keyMutator
- Function used ot mutate the keys. Overrides mutator
.valueMutator
- Function used ot mutate the values. Overrides mutator
.npm install
npm test
FAQs
Mutate keys and values in objects. Returns a new version of the object
The npm package toxic receives a total of 438,972 weekly downloads. As such, toxic popularity was classified as popular.
We found that toxic 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.