# socuments

> Generate sample documents (MongoDB)

Latest version **0.0.0** (published 2020-08-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install socuments
pnpm add socuments
yarn add socuments
bun add socuments
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2020-08-23 |
| First published | 2020-08-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michael Sterpka |
| Maintainers | msterpka |
| Keywords | mongodb, documents, sample, generate, sci-fi, space |

## Links

- npm: https://www.npmjs.com/package/socuments
- Repository: https://github.com/mster/socuments
- Homepage: https://github.com/mster/socuments#readme
- Issues: https://github.com/mster/socuments/issues
- npm.io page: https://npm.io/package/socuments

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.0.0 (latest) — 2020-08-23

## README

# socuments

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

![carbon (2)](https://user-images.githubusercontent.com/15038724/90974739-a9c19780-e4e2-11ea-8355-0fabaadfe113.png)

# Usage

```js
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.

```json
{
  "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!

---
_Source: https://npm.io/package/socuments · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
