
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
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 16 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.