2.0.2 • Published 2 years ago

fileinator v2.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

fileinator

npm version Build Status codecov semantic-release

Behold my latest inator! Generate files full of random bytes. Good for tests.

inator

Installation

npm install -g fileinator

Usage

You can use the fileinator as a command line tool or as a library. To use as a command line tool:

fileinator make 10gb ./bigfile

To use as a library, first install locally: npm install --save fileinator

and then enjoy...

const fileinator = require('../lib/fileinator');
const sizeParser = require('filesize-parser');

const size = sizeParser("20mb");
const path = "./data.dat";

fileinator.writeFile(size, path)
  .on('progress', (data) => {
    console.log(`${data.bytesWritten} of ${size} written`);
  }).on('done', () => {
    console.log(`Complete: ${path}`);
  });

See more in the examples.

License

MIT License

Questions?

Feel free to submit an issue on the repository, or find me at @JustinBeckwith

2.0.2

2 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago