
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
level-inverted-index
Advanced tools
Inverted Index for levelup.
With prewired defaults!
var indexDb = InvertedIndex(db, 'index')
//get list of documents containing 'search' and 'term'
indexDb.query(['search', 'term'], function (err, docs){
console.log(docs)
})
//stream stubs of documents
indexDb.createQueryStream(['search', 'term'])
.on('data', console.log)
Configurable!
var indexDb = InvertedIndex(db, 'index',
//extract words from documents
function map(key, value, index) {
//parse, and pull out any bits of text you want,
//call index with an index and a rank!
//here we split by anything that is not a letter
//or a number
index(value.split(/[^\w\d]+/))
},
//when quering with createQueryStream,
//stub converts from each doc, to a short preview.
//Possibly, highlighting matches with the query!
function stub(doc, query) {
return doc.substring(0, 140) + '...\n'
})
insert documents into the database like you normally would.
fs.readFile('readme.md', function (err, value) {
db.put('readme.md', value, function () {
//and so on!
})
})
//run an index batch
indexDb.start()
add realtime update to level-map-merge and get them in level-inverted-index for free.
https://github.com/dominictarr/level-map-merge/blob/master/index.js#L106-L109
MIT
FAQs
Inverted Index for levelup.
The npm package level-inverted-index receives a total of 5 weekly downloads. As such, level-inverted-index popularity was classified as not popular.
We found that level-inverted-index 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.