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

cjson

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

cjson - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

16

index.js

@@ -194,10 +194,12 @@ var fs = require('fs'),

path.forEach(function(path) {
var data = load(path, options),
filename;
if (fs.existsSync(path)) {
var data = load(path, options),
filename;
if (options.merge) {
exports.extend(true, conf, data);
} else {
filename = Path.basename(path, options.ext);
conf[filename] = data;
if (options.merge) {
exports.extend(true, conf, data);
} else {
filename = Path.basename(path, options.ext);
conf[filename] = data;
}
}

@@ -204,0 +206,0 @@ });

{
"name": "cjson",
"description": "cjson - Commented JavaScript Object Notation. It is a json loader, which parses only valid json files, but with comments enabled. Useful for loading configs.",
"version": "0.4.0",
"version": "0.5.0",
"repository": "git://github.com/kof/node-cjson.git",

@@ -6,0 +6,0 @@ "keywords": [

@@ -85,2 +85,12 @@ var a = require('assert');

a.deepEqual(
cjson.load([
fixtures + '/conf1.json',
'missing-conf.json',
fixtures + '/conf6.json'
], true),
data2,
'load a missing config file among an array of config files and merge them'
);
a.deepEqual(cjson.load(fixtures, {ext: '.cjson'}), {conf9: {a: 1}}, 'use custom ext');

@@ -87,0 +97,0 @@

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