Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
cerebral-module-fuse
Advanced tools
A cerebral module that adds fuzzy search to data in the store.
npm install cerebral-module-fuse
From your main.js
import controller from './controller'
import fuse from 'cerebral-module-fuse'
controller.modules({
findUsers: fuse({
statePath: 'users', // statePath should point to either an object or array in the store
options: { keys: ['firstName', 'lastName'] } // options are passed on to fuse.js
})
})
See fuse docs for more information about available options.
from your component.js
import React from 'react'
import { connect } from 'cerebral-view-react'
import fuse from 'cerebral-module-fuse/computed'
export default connect({
users: fuse({ modulePath: 'findUsers', statePath: 'users' })
}, ({ users }) => (
<ul>
{users.map(user => (
<li>{`${user.firstName} ${user.lastName}`}</li>
))}
</ul>
))
to execute the search simply call the search
signal and the view will automatically update
signals.findUsers.search({ query: 'John' })
you can also access the filtered data from an action via the provided service
export default myAction({ state, services: { findUsers } }) {
const users = findUsers.get(state)
}
Fork repo
npm install
npm start
runs dev mode which watches for changes and auto lints, tests and buildsnpm test
runs the testsnpm run lint
lints the codenpm run build
compiles es2015 to es5FAQs
A cerebral module that adds fuzzy search to data in store
The npm package cerebral-module-fuse receives a total of 3 weekly downloads. As such, cerebral-module-fuse popularity was classified as not popular.
We found that cerebral-module-fuse 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
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.