jsonc-require

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonc-require - npm Package Compare versions

Comparing version

to
0.1.1

# Changes in jsonc-require
## \[0.1.1] - 2019-04-09
### Added
- Some tests.
### Fixed
- Double commas generates an Error, like in VS Code.
## \[0.1.0] - 2019-04-08
First release.

@@ -8,6 +8,6 @@ /*

const COMMAS = /,+(?=\s*[}\]])/.source
const TCOMMA = /,(?=\s*[}\]])/.source
// Matches double-quoted strings and triling commas
const RCM = new RegExp([R.JS_DQSTR.source, COMMAS].join('|'), 'g')
const RCM = new RegExp([R.JS_DQSTR.source, TCOMMA].join('|'), 'g')

@@ -14,0 +14,0 @@ // Matches double-quoted strings and comments

{
"name": "jsonc-require",
"description": "jsonc for require(), similar to the one used by VS Code.",
"version": "0.1.0",
"version": "0.1.1",
"main": "index.js",

@@ -29,3 +29,5 @@ "author": "aMarCruz <amarcruzbox-git@yahoo.com>",

"@types/node": "^11.13.1",
"eslint": "^5.16.0"
"eslint": "^5.16.0",
"expect": "~1.20.2",
"mocha": "^5.2.0"
},

@@ -32,0 +34,0 @@ "dependencies": {

@@ -9,5 +9,8 @@ # jsonc-require

- Transparently loads json files with comments.
- Strips trailing commas\*
- Strips UTF-8 BOM.
- TypeScript definition for *.json.
\* As in VS Code, double commas raises a SyntaxError.
## Install

@@ -14,0 +17,0 @@