# proliferate

> Simple package to create lots of files. Envisioned for creating performance testing fixtures for web frameworks.

Latest version **0.0.5** (published 2020-09-14) · MIT license · 0 weekly downloads

## Install

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

## 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.5 |
| Published | 2020-09-14 |
| First published | 2020-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 0 |
| Unpacked size | 7.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bryan Levay |
| Maintainers | bryanlevay |

## Links

- npm: https://www.npmjs.com/package/proliferate
- Repository: https://github.com/thousand/proliferate
- Issues: https://github.com/thousand/proliferate/issues
- npm.io page: https://npm.io/package/proliferate

## Recent versions

- 0.0.5 (latest) — 2020-09-14
- 0.0.4 — 2020-09-13
- 0.0.3 — 2020-09-13
- 0.0.2 — 2020-08-30

## README

# Proliferate

*/pɹəˈlɪf.əɹ.eɪt/* (transitive, intransitive)  
To increase in number or spread rapidly; to multiply.
> The files proliferated rapidly.

---

Create a bunch of simple files in a jiffy.

Right now it's pretty simple and just makes a bunch of files in a brute force way.
In the future I'd like to support more token replacement, and bulk creation of
directories in addition to files.

## Usage

Install the package via npm: `npm i -D proliferate`.

```js
const Proliferation = require('proliferate');
const path = require('path');

// create a proliferation
const p = new Proliferation({
  count: 5000,
  fileName: 'file-%ID%.json',
  filePath: path.join(__dirname, 'data'),
  content: '{ "id": "%ID%" }'
});

// make it rain
p.write(); // write is done asynchronously
```

## Usage

The `Proliferation` class takes a simple configuration object. Right now it simply
replaces the `%ID%` token where it appears in the file name or content with a numeric ID. 
The ID is zero indexed, left padded to match the full count. 

`Proliferation` class instances have a single, async method,`write`. It uses
`fsPromises.writeFile()`, and does `path.join(filePath, fileName)` for the location.
*Any files which already exist will be replaced.*

### API

Property     | What you need to know
------------ | -------------
`count` | Number. How many files to make
`filePath` | String. Base path for where the files will be written. If it does not exist, it will be created recursively.
`fileName` | String. Template for the name of the file. `%ID%` will be replaced with the ID as described above.
`content` | String. What goes in the file. `%ID%` will be replaced with the ID as described above.

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