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

json-colorizer

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-colorizer - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

2

package.json
{
"name": "json-colorizer",
"version": "1.1.0",
"version": "1.1.1",
"description": "A library to format JSON with colors for display in the console",

@@ -5,0 +5,0 @@ "main": "src/lib/index.js",

@@ -22,3 +22,3 @@ # json-colorizer

var colorize = require('json-colorizer');
var json = JSON.stringify({"foo": "bar"}, null, 2)
var json = JSON.stringify({"foo": "bar"}, null, 2);
console.log(colorize(json);

@@ -34,3 +34,3 @@ ```

var colorize = require('json-colorizer');
var chalk = require('chalk')
var chalk = require('chalk');
console.log(colorize({ "foo": "bar" }, {

@@ -40,3 +40,3 @@ colors: {

}
});
}));
```

@@ -43,0 +43,0 @@

@@ -8,4 +8,4 @@ const tokenTypes = [

{ regex: /^-?\d+(?:\.\d+)?(?:e[+\-]?\d+)?/i, tokenType: 'NUMBER_LITERAL' },
{ regex: /^"(?:\\.|[^"])*"(?=\s*:)/, tokenType: 'STRING_KEY'},
{ regex: /^"(?:\\.|[^"])*"/, tokenType: 'STRING_LITERAL'},
{ regex: /^"(?:\\.|[^"\\])*"(?=\s*:)/, tokenType: 'STRING_KEY'},
{ regex: /^"(?:\\.|[^"\\])*"/, tokenType: 'STRING_LITERAL'},
{ regex: /^true|false/, tokenType: 'BOOLEAN_LITERAL' },

@@ -19,3 +19,3 @@ { regex: /^null/, tokenType: 'NULL_LITERAL' }

var tokens = [];
var foundToken = false;
var foundToken;

@@ -27,2 +27,3 @@ var match;

do {
foundToken = false;
for (i = 0; i < numTokenTypes; i++) {

@@ -29,0 +30,0 @@ match = tokenTypes[i].regex.exec(input);

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