2.0.0 ā€¢ Published 2 years ago

@ultirequiem/y2j v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Y2J

Code Coverage Deno Doc

YAML to JSON and vice versa šŸš€

Usage

The API is the same on all this platforms āœ”ļø

Deno šŸ¦•

import { JSONtoYAML, YAMLtoJSON } from "https://deno.land/x/y2j/mod.ts";

Node.js šŸ¦–

import { JSONtoYAML, YAMLtoJSON } from "@ultirequiem/y2j";

Browser šŸŒ

You can use any CDN šŸ”„

Eg šŸ‘‰ ESM ā†”ļø SkyPack šŸ†š Script Tag ā†”ļø JSDelivr

Documentation

Is hosted on Deno Doc šŸ“š

CLI

Install

Deno šŸ¼

deno install https://deno.land/x/y2j/y2j.ts

Node.js šŸŽƒ

npm install -g @ultirequiem/y2j

Usage

$ y2j example.json
menu:
  id: file
  value: File
  popup:
    menuitem:
      - value: New
        onclick: CreateNewDoc()
      - value: Open
        onclick: OpenDoc()
      - value: Close
        onclick: CloseDoc()

$ y2j example.yaml
{
  "menu": {
    "id": "file",
    "value": "File",
    "popup": {
      "menuitem": [
        { "value": "New", "onclick": "CreateNewDoc()" },
        { "value": "Open", "onclick": "OpenDoc()" },
        { "value": "Close", "onclick": "CloseDoc()" }
      ]
    }
  }
}

If you pass the --write the output will not be printed. Instead it will be in a new file with the same name, but with other extension.

Support

Open an Issue, I will check it a soon as possible šŸ‘€

If you want to hurry me up a bit send me a tweet šŸ˜†

Consider supporting me on Patreon if you like my work šŸ™

Don't forget to start the repo ā­

Versioning

We use Semantic Versioning. For the versions available, see the tags šŸ·ļø

Authors

Eliaz Bobadilla - Creator and Maintainer šŸ’Ŗ

See also the full list of contributors who participated in this project āœØ

Licence

Licensed under the MIT License šŸ“„