
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
fuse-immutable
Advanced tools
Lightweight fuzzy-search for Immutable.js (Based on Fuse.js by krisk)
Lightweight fuzzy-search for Immutable.js (Based on Fuse.js by krisk)
Table of Contents
The obvious difference is that it works with Immutable.js data. Instead of an array for your list
argument, pass in an Immutable.List.
One other key difference is the results when using tokenize
and matchAllTokens
together. Fuse.js will return items that have a single value that matches all tokens. fuse-immutable returns items where each token can be found somewhere in the item.
import { fromJS } from 'immutable'
import Fuse from 'fuse-immutable'
const list = fromJS([{
title: 'Jackson',
author: 'Steve Pearson',
tags: ['Kevin Wong', 'Victoria Adam', 'John Smith']
}, {
title: 'The life of Jane',
author: 'John Smith',
tags: ['Jane', 'Jackson', 'Sam']
}, {
title: 'The life of John',
author: 'Jane Wong',
tags: ['Victoria Adam', 'John Pearson']
}])
const options = {
threshold: 0,
tokenize: true,
matchAllTokens: true,
}
const fuse = new Fuse(list, options)
console.log(fuse.search('Jackson Wong'))
// List [
// Map {
// "title": "Jackson",
// "author": "Steve Pearson",
// "tags": List [ "Kevin Wong", "Victoria Adam", "John Smith" ]
// }
// ]
Code should be run through Standard Format.
Before submitting a pull request, please add relevant tests in test/index.js
, and execute them via npm test
.
Version 2.0.0
verbose
option, which will print to the console useful information, mostly for debuggingFAQs
Lightweight fuzzy-search for Immutable.js (Based on Fuse.js by krisk)
The npm package fuse-immutable receives a total of 291 weekly downloads. As such, fuse-immutable popularity was classified as not popular.
We found that fuse-immutable 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 RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.