New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yaml-convert

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaml-convert

Command-line utility for reading & writing YAML files

1.0.1
latest
Source
npm
Version published
Weekly downloads
4.7K
-28.91%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

YAML

FAQs

Package last updated on 13 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts