Skip to content

cutsin/json-parse-with-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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..> }

About

JSON.parse with protocol like 'path:', 'file:'

Resources

Stars

Watchers

Forks

Packages

No packages published