Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fmtconv

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fmtconv

Convert between JSON and YAML format files.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-15.55%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 13 Feb 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc