@deprecatedluxas/jsontoliteral

A nodejs cli to convert a json file to typescript string literal

Usage no npm install needed!

<script type="module">
  import deprecatedluxasJsontoliteral from 'https://cdn.skypack.dev/@deprecatedluxas/jsontoliteral';
</script>

README

jsontoliteral

A nodejs cli to convert a json file to typescript string literal

Install

$ npm install jsontoliteral

Usage

JSON file format

{
  "literals": [
    {
      "literal": "Dog"
    },
    {
      "literal": "Cat"
    },
    {
      "literal": "Cow"
    }
  ]
}
$ jsontoliteral animals.json