editor-json-parser
Advanced tools
Comparing version
@@ -662,3 +662,3 @@ /* parser generated by jison 0.4.17 */ | ||
}, | ||
rules: [/^(?:\s+)/,/^(?:[\/\/].*\n)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:'(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f'])*')/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:undefined\b)/,/^(?:[a-zA-Z0-9_\u4e00-\u9fa5]+)/,/^(?:$)/,/^(?:.)/], | ||
rules: [/^(?:[\s↵]+)/,/^(?:[\/\/].*\n)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:'(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f'])*')/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:undefined\b)/,/^(?:[a-zA-Z0-9_\u4e00-\u9fa5]+)/,/^(?:$)/,/^(?:.)/], | ||
conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}} | ||
@@ -665,0 +665,0 @@ }); |
{ | ||
"name": "editor-json-parser", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "this repo support parse standard [json](http://json.org/) and something like this:", | ||
@@ -18,4 +18,9 @@ "main": "dist/json_parser.js", | ||
}, | ||
"scripts": { | ||
"test": "mocha test/main.test.js --require babel-register" | ||
}, | ||
"homepage": "https://github.com/albin3/editor-json-parser#readme", | ||
"devDependencies": { | ||
"babel-preset-es2015": "^6.22.0", | ||
"babel-register": "^6.22.0", | ||
"jison": "^0.4.17", | ||
@@ -22,0 +27,0 @@ "mocha": "^3.2.0", |
@@ -5,2 +5,6 @@ # editor-json-parser | ||
[![Build Status][travis-image]][travis-url] | ||
[![NPM Version][npm-image]][npm-url] | ||
[![NPM Downloads][downloads-image]][downloads-url] | ||
> support: AMD / CommonJs / script tag | ||
@@ -57,1 +61,13 @@ | ||
``` | ||
## AMD support | ||
... | ||
[travis-image]: https://api.travis-ci.org/albin3/editor-json-parser.svg | ||
[travis-url]: https://travis-ci.org/albin3/editor-json-parser | ||
[npm-image]: https://img.shields.io/npm/v/editor-json-parser.svg | ||
[npm-url]: https://npmjs.org/package/editor-json-parser | ||
[downloads-image]: https://img.shields.io/npm/dm/editor-json-parser.svg | ||
[downloads-url]: https://npmjs.org/package/editor-json-parser | ||
@@ -65,3 +65,12 @@ 'use strict'; | ||
}); | ||
it ('support {↵ a: "xxx"↵}', function () { | ||
let result = jsonParser.parse(` | ||
{↵ a: 'xxx'↵} | ||
`); | ||
result.should.deepEqual({a: 'xxx'}); | ||
}) | ||
}); | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
38857
2.81%10
25%752
0.8%0
-100%72
28.57%5
66.67%