An open API service indexing awesome lists of open source software.

https://github.com/wpj/cerealize

Serialize CLI arguments
https://github.com/wpj/cerealize

Last synced: 8 months ago
JSON representation

Serialize CLI arguments

Awesome Lists containing this project

README

          

# cerealize

Serialize CLI arguments.

## Install

npm:

```sh
$ npm install --save cerealize
```

yarn:

```sh
$ yarn add cerealize
```

## Usage

```javascript
import toString from 'cerealize';
import { dashes, eq } from 'cerealize/flags';

console.log(toString(dashes, { format: 'markdown' }, './file.js'));
// '--format markdown ./file.js'

console.log(
toString({ format: eq, c: dash }, { format: 'markdown', c: 1 }, './file.js'),
);
// '--format=markdown -c 1 ./file.js'
```