
Research
PyPI Package Impersonates SymPy to Deliver Cryptomining Malware
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.
swap-to-level
Advanced tools
Key value store that holds datasets in memory until they reach a given size and then swaps them to leveldb
Key value store that holds datasets in memory until they reach a given size and then swaps them to leveldb
npm install swap-to-level
var swap = require('swap-to-level')
var store = swap(db, {max: 5}) // where db is a levelup
store.put('hello', 'world', function (err) {
// will store 'world' in memory
})
... insert 4 more values ...
store.put('another', 'one', function (err) {
// since we inserted 6 values ALL of the inserted data have
// been swapped to being stored in leveldb instead of memory
})
store = swap(db, [options])Create a new memswap instance. Options include:
{
max: 10, // Max keys stored before swapping. Defaults to Infinity
valueEncoding: ... // Set a leveldb valueEncoding to use
}
store.put(key, value, [cb])Insert a value in the store.
store.get(key, cb)Get a value from the store. If the key does not exist an error is
returned with err.notFound === true
store.del(key, [cb])Delete a value from the store.
store.on('swap', fn)Emitted when the values are swapped from memory to leveldb.
Happens if the swap contains more than max values.
MIT
FAQs
Key value store that holds datasets in memory until they reach a given size and then swaps them to leveldb
We found that swap-to-level 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
Malicious PyPI package sympy-dev targets SymPy users, a Python symbolic math library with 85 million monthly downloads.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.