yamfist
cli tool for json <-> yaml conversion
Last updated a year ago by brekk .
ISC · Repository · Original npm · Tarball · package.json
$ cnpm install yamfist 
SYNC missed versions from official npm registry.
██╗   ██╗ █████╗ ███╗   ███╗███████╗██╗███████╗████████╗
╚██╗ ██╔╝██╔══██╗████╗ ████║██╔════╝██║██╔════╝╚══██╔══╝
 ╚████╔╝ ███████║██╔████╔██║█████╗  ██║███████╗   ██║   
  ╚██╔╝  ██╔══██║██║╚██╔╝██║██╔══╝  ██║╚════██║   ██║   
   ██║   ██║  ██║██║ ╚═╝ ██║██║     ██║███████║   ██║   
   ╚═╝   ╚═╝  ╚═╝╚═╝     ╚═╝╚═╝     ╚═╝╚══════╝   ╚═╝   

yamfist

convert yaml <-> json simply and easily

Usage: yamfist <flags> [input]

Flags:

--file, -f [boolean] read from the file system

--help, -h [boolean] get help

--output, -o [string] write to the file system

--to, -t [string] set output format

--color, -k [boolean] use --no-color to turn colors off (default: true)

--verbose, -v [number] set verbosity 1 - 3

API

Table of Contents

json2yaml

Convert json to yaml

Parameters

  • opts object configuration object
  • source string instructions to parse

Returns Future<string> future-wrapped string

yaml2json

Convert yaml to json

Parameters

  • opts object configuration object
  • source string instructions to parse

Returns Future<string> future-wrapped json

parseJSON

read json from string

Parameters

  • raw string raw value to read

Returns Future<object> future-wrapped value

parseYAML

read yaml from string

Parameters

  • opts object options object, passes to yaml.safeLoad / yaml.load
    • opts.safe boolean run in safe mode?
  • x string raw data to read

Returns object parsed yaml

toYAML

convert json to yaml

Parameters

  • opts object an options object to pass to yaml.dump
  • raw object raw data to read

Returns string yaml-formatted object

Current Tags

  • 0.0.1                                ...           latest (a year ago)

1 Versions

  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |