1.1.0 • Published 3 years ago

fmtconv v1.1.0

Weekly downloads
4,743
License
Apache-2.0
Repository
github
Last release
3 years ago

fmtconv

Greenkeeper badge Node.js(≥12.22) CI Coverage Status Standard - JavaScript Style Guide License

Convert between JSON and YAML format files.

NPM

fmtconv status

Features

  • Support JSON/YAML format files.
  • Convert with JSON/YAML format files.
  • Transcode with JSON/YAML format strings.

Installation

CLI executable

npm install -g fmtconv

API install

npm install --save fmtconv

CLI Usage

$ fmtconv -h

  Usage: fmtconv [-h] [-v] [-c] [-o file] <-i file | file>

  Convert between JSON and YAML format files.

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    -o, --output <file>  output a JSON/YAML file
    -i, --input <file>   input a JSON/YAML file
    -c, --compact        compact JSON/YAML format string
    --debug              debug mode, such as print error tracks

API Usage

Here we cover the most 'useful' methods.

const fmtconv = require('fmtconv')

fmtconv (input:string, output:string)

Convert between JSON and YAML format files.

The first string sets an input file path, the second string sets an output file path.

.stringJSON2YAML (content:string)

Transcode JSON to YAML string.

.stringYAML2JSON (content:string)

Transcode YAML to JSON string.

License

The Apache License 2.0

1.1.0

3 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.0

7 years ago

0.0.1

7 years ago