
Research
/Security News
DuckDB npm Account Compromised in Continuing Supply Chain Attack
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
fake-json-generator
Advanced tools
Fake JSON generator for playing with nodeJs fs module, testing redis cache,for creating fake REST API etc.
$ npm i fake-json-generator
Note Keep json file in the same directory. And provide full path for JSON file.
It exposes synchronous and asynchronous methods.
/**
fakeJSON expect 2 argument first one is path and second one is number of JSON Object.
e.g. fakeJSON(path, No_Of_JSON_obj);
**/
const { fakeJSONSync, fakeJSON } = require("fake-json-generator");
// Asynchronous
fakeJSON(`${__dirname}/fake-JSON.json`, 200)
.then((res) => console.log('RESPONSE', res))
.catch(err => console.log('ERROR', err));
// Synchronous
const ss = fakeJSONSync(`${__dirname}/fake-JSON.json`, 100);
### Output
[
{ "_id": 828181167,
"title": "Sir",
"firstName": "Richelle",
"lastName": "Charley",
"favouriteColor": "lightseagreen",
"about": "finibus maecenas dignissim vel blandit placerat sed tempor ex faucibus ...",
"address": {
"street": "Pitman Street",
"city": "Manchester",
"country": "Bermuda",
"countryCode": "BM"
},
"company": "LoopSys",
"contactDetails": {
"phone": "(488)-(869)-(240)",
"email": "Richelle.Charley@LoopSys.com"
}
},
...
,
...
]
FAQs
generate fake json in a file
We found that fake-json-generator 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
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.