json-parse-with-protocol

0.0.2 • Public • Published

JSON.parse with protocol

It's instead of shortstop@async, sometimes we need read config file sync

Installation

npm install json-parse-with-protocol

Usage

var jsonpp = require('json-parse-with-protocol')

var jsonString = JSON.stringify({
	foo: 'bar',
	path: 'path:./your-path',
	file: 'file:/your-file'
})

console.log( jsonpp(jsonString) )
// -> { foo: bar, path: "/full path/your-path", file: <..file buffer..> }

Package Sidebar

Install

npm i json-parse-with-protocol

Weekly Downloads

4

Version

0.0.2

License

MIT

Last publish

Collaborators

  • cutsin