socuments

0.0.0 • Public • Published

socuments

Make some wacky sci-fi themed sample documents, batteries included!

carbon (2)

Usage

const socuments = require("socuments");
const { writeFileSync } = require("fs");
 
const docs = socuments(100);
 
writeFileSync("./datadump.json", JSON.stringify(docs));
 
console.log(docs);

socuments ([ count, template]):

  • count: how many ya' want cheif?
  • template: a JSON template to use instead of the default.

Templates

Something like this.

{
  "foo": { "letters": 10 },
  "bar": { "letter": true },
  "baz": { "number": 10 },
  "qux": { "uuid": 24 },
  "quux": { "email": 12 },
  "corge": { "password": 24 },
  "grault": { "lorem": 126 },
  "garply": { "date": true },
  "waldo": { "boolean": 1 },
  "fred": { "bloodtype": true },
  "plugh": { "name": true }
}

For everything that supports integer values, the value represents the length. Setting letter to true capitalizes it. name and bloodtype have passthrough, so if you want presets, there you go!

Want more cool types? Open a PR!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.0
    0

Package Sidebar

Install

npm i socuments

Weekly Downloads

0

Version

0.0.0

License

MIT

Unpacked Size

10.2 kB

Total Files

3

Last publish

Collaborators

  • msterpka