Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
A factory of factory functions. Share and extend object data.
$ npm install --save factor-in
import factorIn from 'factor-in'
// Create our base object data we expect all
// factory functions to inherit from.
const f = factorIn ({
foo () {},
bar () {}
})
var obj = f ({ baz: 'Baz', qux: 'Qux' })
//=> {foo: foo(), bar: bar(), baz: 'Baz', qux: 'Qux'}
test('Demo component', nest => {
// fixture to be shared across nested tests
const fixture = factorIn({
setWord () {},
setMode () {}
})
nest.test('...with basic fixture', t => {
const el = <Hello actions={ fixture() } />
//> { setWord: function setWord () {}, setMode: function setMode () {} }
t.equal(actual, expected, 'should have common methods')
t.end()
})
nest.test('...with extended fixture', t => {
const extendedFixture = fixture({ setAction () {} })
const el = <Hello actions={ extendedFixture } />
//> { setWord: function setWord () {}, setMode: function setMode() {}, setAction: function setAction() {} }
t.equal(actual, expected, 'should have common and extended methods')
t.end()
})
})
MIT © Chris Buttery
FAQs
A factory of factory functions. Share and extend object data.
The npm package factor-in receives a total of 13 weekly downloads. As such, factor-in popularity was classified as not popular.
We found that factor-in 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 found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.