0.0.3 • Published 6 years ago

hjson-dsf-regex v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

HJSON Regex DSF

Parse slash-delimited regexes in HJSON as RegExp

Build Status

Usage

const util = require('util')
const hjson = require('hjson')
const regexDsf = require('hjson-dsf-regex')
const data = `myre: /^\\d+/`
const parsed = hjson.parse(data, {dsf:[regexDsf()]})
console.log(util.inspect(parsed)) // -> { myre: /^\d+/ }