Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jsonc-parser

Package Overview
Dependencies
Maintainers
11
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonc-parser - npm Package Compare versions

Comparing version 0.4.2 to 1.0.0

12

CHANGELOG.md
1.0.0
==================
* remove nls dependency (remove getParseErrorMessage)
0.4.2 / 2017-05-05
==================
* added ParseError.offset & ParseError.length
0.4.1 / 2017-04-02
==================
* added ParseOptions.allowTrailingComma
0.4.0 / 2017-02-23

@@ -3,0 +15,0 @@ ==================

1

lib/main.d.ts

@@ -93,3 +93,2 @@ export declare enum ScanError {

}
export declare function getParseErrorMessage(errorCode: ParseErrorCode): string;
export declare type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';

@@ -96,0 +95,0 @@ export interface Node {

@@ -7,3 +7,3 @@ (function (factory) {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "vscode-nls"], factory);
define(["require", "exports"], factory);
}

@@ -16,4 +16,2 @@ })(function (require, exports) {

'use strict';
var nls = require("vscode-nls");
var localize = nls.loadMessageBundle();
var ScanError;

@@ -431,18 +429,2 @@ (function (ScanError) {

})(ParseErrorCode = exports.ParseErrorCode || (exports.ParseErrorCode = {}));
function getParseErrorMessage(errorCode) {
switch (errorCode) {
case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol');
case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format');
case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected');
case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected');
case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected');
case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected');
case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected');
case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected');
case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected');
default:
return '';
}
}
exports.getParseErrorMessage = getParseErrorMessage;
function getLiteralNodeType(value) {

@@ -449,0 +431,0 @@ switch (typeof value) {

{
"name": "jsonc-parser",
"version": "0.4.2",
"version": "1.0.0",
"description": "Scanner and parser for JSON with comments.",

@@ -22,5 +22,2 @@ "main": "./lib/main.js",

},
"dependencies": {
"vscode-nls": "^2.0.2"
},
"scripts": {

@@ -27,0 +24,0 @@ "prepublish": "tsc -p ./src",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc