fmtconv
Convert between JSON and YAML format files.
Last updated a month ago by windomz .
Apache-2.0 · Repository · Bugs · Original npm · Tarball
$ cnpm install fmtconv 
SYNC missed versions from official npm registry.

fmtconv

Greenkeeper badge Build Status Coverage Status Dependency Standard - JavaScript Style Guide License

Convert between JSON and YAML format files.

NPM

fmtconv status

Features

  • [x] Support JSON/YAML format files.
  • [x] Convert with JSON/YAML format files.
  • [x] 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

Maintainers (1)
Downloads
Today 0
This Week 4
This Month 7
Last Day 1
Last Week 3
Last Month 51
Dependencies (2)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |