jstransformer-hjson

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i jstransformer-hjson

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • calebeby
  • forbeslindesay
  • hemanth
  • robloach
  • stoeffel
  • timothygu