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.
basic-factory
Advanced tools
[![Build Status](https://travis-ci.org/bkd705/basic-factory.svg?branch=master)](https://travis-ci.org/bkd705/basic-factory)
A basic tool providing an easy way to generate blocks of mock data for tests or as placeholders.
npm install --save-dev basic-factory
// OR YARN
yarn add --dev basic-factory
{appDir}/helpers/factories.js
// ES6
import BasicFactory from 'basic-factory'
const factory = BasicFactory()
factory.register('User', () => {
// Would probably use Faker or something to generate these fields randomly.
return {
username: `user${Math.random() * 100}`,
email: `user${Math.random() * 100}`
}
})
export default factory
import factory from '{appDir}/helpers/factories'
const oneUser = factory.create('User')
const arrayOfUsers = factory.createMany('User', 5)
yarn
/ npm install
yarn test
/ npm run test
See CONTRIBUTING.md
FAQs
[![Build Status](https://travis-ci.org/bkd705/basic-factory.svg?branch=master)](https://travis-ci.org/bkd705/basic-factory)
We found that basic-factory 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.