This package has been deprecated

Author message:

Command-line tool now included in yaml package

yaml-convert

1.0.1 • Public • Published

yaml-convert

Command-line utility for converting between YAML and JSON, using yaml. By default parses either YAML or JSON from standard input and outputs JSON on standard output.

Installation

npm install yaml-convert

Usage

yaml-convert [input]

Convert between YAML and JSON, optionally wrapping output as a JS module

Output format:
  --es6, -e   Convert to an ECMAScript module                          [boolean]
  --json, -j  Convert to JSON                          [boolean] [default: true]
  --node, -n  Convert to a Node.js module                              [boolean]
  --yaml, -y  Convert to YAML                                          [boolean]

Options:
  --version     Show version number                                    [boolean]
  --input, -i   Input file; use - for stdin              [string] [default: "-"]
  --keep, -k    When outputting YAML, keep original styling            [boolean]
  --output, -o  Output file; use - for stdout            [string] [default: "-"]
  --pretty, -p  When outputting JS or JSON, make it pretty             [boolean]
  --quiet, -q   Silence warnings and errors; always try to produce output
                                                                       [boolean]
  --help        Show help                                              [boolean]

Examples

yaml-convert --input file.yaml --output file.json
yaml-convert -np < file.yaml > file.js
yaml-convert file.yaml | jq .foo

Dependents (0)

Package Sidebar

Install

npm i yaml-convert

Weekly Downloads

3,224

Version

1.0.1

License

ISC

Unpacked Size

5.46 kB

Total Files

4

Last publish

Collaborators

  • eemeli