
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fixture-maker
Advanced tools
FixtureMaker is a simple package made to help you create fixture files (for testing, creating sample data etc). Currently, the fixtures are only made in json format.
This is available as an npm package.
npm i -D fixture-maker
// 1. Require the package
const FixtureMaker = require("fixture-maker");
const fixtureMaker = new FixtureMaker();
// 2. Define the shape of your fixture
const fixtureBody = {
firstName: fixtureMaker.string({ chars: 10 }),
phones: fixtureMaker.randomNumber({ between: 100, and: 500 }),
id: fixtureMaker.uuid(),
date: fixtureMaker.randomDate({ between: "01-01-1980", and: "01-09-2019" })
};
// 3. Create your fixture file
fixtureMaker.make({
body: fixtureBody,
numberOfCopies: 100,
filename: "helloworld"
});
Note: Currently, fixture-maker only supports objects with one level of nested objects.
// helloworld.json
[
{
"firstName": "f7n9pCjrYF",
"phones": 274,
"id": "de16912a-b078-43ca-b12f-97def6d8d474",
"date": "1992-03-03T00:00:00.000Z"
},
{
"firstName": "PNVuOWtTyF",
"phones": 434,
"id": "a3e480a1-6f4c-4051-80bc-b3454a1b3c7b",
"date": "2017-12-29T00:00:00.000Z"
},
{
"firstName": "SI0z18DYE6",
"phones": 466,
"id": "5fae809b-f2f3-49b3-b866-bc4f08096fad",
"date": "1993-11-07T00:00:00.000Z"
},
{
"firstName": "GVcMG7uDV0",
"phones": 286,
"id": "233a5b95-01ae-49ab-9c2c-ca805225bae6",
"date": "2011-05-15T23:00:00.000Z"
},
{
"firstName": "tNzFO7FTW3",
"phones": 386,
"id": "d0c6c313-b565-4796-bfed-a372ef680d3e",
"date": "2000-05-24T23:00:00.000Z"
}
]
const FixtureMaker = require("fixture-maker");
const fixtureMaker = new FixtureMaker();
const fixtureBody = {
firstName: fixtureMaker.string({ chars: 10 }),
lastname: "Jones",
information: {
licenseNumber: fixtureMaker.uuid(),
phoneNumber: fixtureMaker.randomNumber({ between: 1000, and: 2000 }),
cool: true,
boo: false,
dateOfBirth: fixtureMaker.randomDate({
between: "01-01-2018",
and: "12-31-2019"
})
}
};
fixtureMaker.make({
body: fixtureBody,
numberOfCopies: 5,
filename: "helloworld"
});
// helloworld.json
[
{
"firstName": "lClqiZ76D0",
"lastname": "Jones",
"information": {
"licenseNumber": "40a8cfb5-64bb-4d69-a9fc-76757ea20fdd",
"phoneNumber": 1777,
"cool": true,
"boo": false,
"dateOfBirth": "2018-09-01T23:00:00.000Z"
}
},
{
"firstName": "8vp1USXpKz",
"lastname": "Jones",
"information": {
"licenseNumber": "c73975c4-c83a-4355-b573-64fd7599b39c",
"phoneNumber": 1884,
"cool": true,
"boo": false,
"dateOfBirth": "2019-11-28T00:00:00.000Z"
}
},
{
"firstName": "SON0qdCgqH",
"lastname": "Jones",
"information": {
"licenseNumber": "c160ee59-095e-42ca-947e-f01bc0c8d77a",
"phoneNumber": 1004,
"cool": true,
"boo": false,
"dateOfBirth": "2019-04-24T23:00:00.000Z"
}
},
{
"firstName": "0t84UmDAgA",
"lastname": "Jones",
"information": {
"licenseNumber": "dd159301-9906-4df3-aaa1-e2af3e50f13e",
"phoneNumber": 1054,
"cool": true,
"boo": false,
"dateOfBirth": "2018-04-02T23:00:00.000Z"
}
},
{
"firstName": "zxd9AkBN9j",
"lastname": "Jones",
"information": {
"licenseNumber": "a00f7bd0-d53a-4e10-8747-796a34f986d2",
"phoneNumber": 1451,
"cool": true,
"boo": false,
"dateOfBirth": "2018-07-07T23:00:00.000Z"
}
}
]
I'd love any contributors helping me with this. Please read this doc for more information
FAQs
A package that generates fixture files programatically
We found that fixture-maker 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.