npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

jstransformer-hjson

0.0.1

@calebeby

npmHomeRepoSnykSocket
Downloads:131
$ npm install jstransformer-hjson
DailyWeeklyMonthlyYearly

jstransformer-hjson

Hjson support for JSTransformers.

Build Status Coverage Status Dependency Status NPM version

Installation

npm install jstransformer-hjson

API

var hjson = require('jstransformer')(require('jstransformer-hjson'));

var text = `
  {
    // comments
    hi: true
    // no commas
    test: this is a test
    // no quotes
  }
`
hjson.render(text).body
//=> '{"hi":"true","test":"this is a test"}'

// `formatted` is a special option that makes the output indented

hjson.render(text, {formatted: true}).body
//=> {
//=>   "hi": "true",
//=>   "test": "this is a test"
//=> }

// Options other than `formatted` are passed to hjson
// See https://github.com/hjson/hjson-js#hjsonparsetext-options

License

MIT