
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
level-modify
Advanced tools
Modify an existing key in a levelup store. Uses level-lock to prevent race conditions. See also: level-create, level-move
let db = require('level')('colors.db')
let modify = require('level-modify');
function redToBlue(color) {
if (color === 'red') color = 'blue';
return color;
}
db.put('fence', 'red', (err) => {
modify(db, 'fence', redToBlue, (err) => {
if (err && err.code === 'LOCKED') return console.error('conflict');
db.get('fence', (err, color) => {
console.log(color); // blue
});
});
});
Modify the value at key. mod can be a function in the form of function(oldValue) {return newValue;} or an object which will be merged with the old value like so: Object.assign(oldValue, mod);
If the key is write-locked by a concurrent operation an error will be given to the callback with err.code being 'LOCKED'. Like other levelup methods if callback is omitted errors will be thrown.
Alternatively install onto the db object:
MIT
FAQs
Modify an existing key in a levelup store.
The npm package level-modify receives a total of 2 weekly downloads. As such, level-modify popularity was classified as not popular.
We found that level-modify 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
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.