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

cson

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cson - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3

48

out/lib/cson.js
// Generated by CoffeeScript 1.6.3
var CSON, coffee, fsUtil, js2coffee, pathUtil, wait;
var CSON, coffee, extractOpts, fsUtil, js2coffee, pathUtil, requireFreshSafe, wait;

@@ -12,2 +12,6 @@ coffee = require('coffee-script');

extractOpts = require('extract-opts').extractOpts;
requireFreshSafe = require('requirefresh').requireFreshSafe;
wait = function(delay, fn) {

@@ -19,21 +23,8 @@ return setTimeout(fn, delay);

parseFile: function(filePath, opts, next) {
var err, result,
var err, _ref,
_this = this;
if ((opts != null) === true && (next != null) === false) {
next = opts;
opts = null;
}
opts || (opts = {});
_ref = extractOpts(opts, next), opts = _ref[0], next = _ref[1];
filePath = pathUtil.resolve(filePath);
if (/\.(js|coffee)$/.test(filePath)) {
try {
delete require.cache[filePath];
result = require(filePath);
delete require.cache[filePath];
} catch (_error) {
err = _error;
return next(err, result);
} finally {
return next(null, result);
}
requireFreshSafe(filePath, next);
} else if (/\.(json|cson)$/.test(filePath)) {

@@ -59,11 +50,3 @@ fsUtil.readFile(filePath, function(err, data) {

if (/\.(js|coffee)$/.test(filePath)) {
try {
delete require.cache[filePath];
result = require(filePath);
delete require.cache[filePath];
return result;
} catch (_error) {
err = _error;
return err;
}
return result = requireFreshSafe(filePath);
} else if (/\.(json|cson)$/.test(filePath)) {

@@ -84,8 +67,5 @@ data = fsUtil.readFileSync(filePath);

parse: function(src, opts, next) {
var _this = this;
if ((opts != null) === true && (next != null) === false) {
next = opts;
opts = null;
}
opts || (opts = {});
var _ref,
_this = this;
_ref = extractOpts(opts, next), opts = _ref[0], next = _ref[1];
wait(0, function() {

@@ -142,3 +122,5 @@ var result;

if (!Array.isArray(obj)) {
result = '{\n' + result + '\n}';
if (result !== '{}') {
result = '{\n' + result + '\n}';
}
}

@@ -145,0 +127,0 @@ }

{
"name": "cson",
"version": "1.4.2",
"description": "CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects",
"homepage": "https://github.com/bevry/cson",
"keywords": [
"javascript",
"coffeescript",
"json",
"cson",
"parse",
"stringify"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
"Ryan LeFevre <meltingice8917@gmail.com> (https://github.com/meltingice)",
"Linus G Thiel <linus@hanssonlarsson.se> (https://github.com/linus)",
"Zhang Cheng <czhang.oss@gmail.com> (https://github.com/zhangcheng)",
"Nicolae Claudius <claudius.nicolae@gmail.com> (https://github.com/clyfe)",
"Joel Perras <joel.perras@gmail.com> (https://github.com/jperras)"
],
"bugs": {
"url": "https://github.com/bevry/cson/issues"
},
"repository" : {
"type": "git",
"url": "http://github.com/bevry/cson.git"
},
"engines" : {
"node": ">=0.6.0"
},
"dependencies": {
"coffee-script": "~1.6.3",
"js2coffee": "~0.1.4"
},
"devDependencies": {
"chai": "~1.6.1",
"joe": "~1.2.0",
"joe-reporter-console": "~1.2.1"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/everything.test.js"
},
"bin": {
"cson2json": "./bin/cson2json",
"json2cson": "./bin/json2cson"
},
"main": "./out/lib/cson"
"name": "cson",
"version": "1.4.3",
"description": "CoffeeScript-Object-Notation Parser. Same as JSON but for CoffeeScript objects",
"homepage": "https://github.com/bevry/cson",
"keywords": [
"javascript",
"coffeescript",
"json",
"cson",
"parse",
"stringify"
],
"author": "Bevry Pty Ltd <us@bevry.me> (http://bevry.me)",
"maintainers": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)"
],
"contributors": [
"Benjamin Lupton <b@lupton.cc> (https://github.com/balupton)",
"Ryan LeFevre <meltingice8917@gmail.com> (https://github.com/meltingice)",
"Linus G Thiel <linus@hanssonlarsson.se> (https://github.com/linus)",
"Zhang Cheng <czhang.oss@gmail.com> (https://github.com/zhangcheng)",
"Nicolae Claudius <claudius.nicolae@gmail.com> (https://github.com/clyfe)",
"Joel Perras <joel.perras@gmail.com> (https://github.com/jperras)"
],
"bugs": {
"url": "https://github.com/bevry/cson/issues"
},
"repository": {
"type": "git",
"url": "http://github.com/bevry/cson.git"
},
"engines": {
"node": ">=0.8.0"
},
"dependencies": {
"coffee-script": "~1.6.3",
"js2coffee": "~0.1.4",
"extract-opts": "~2.2.0",
"requirefresh": "~1.1.1"
},
"devDependencies": {
"chai": "~1.7.2",
"joe": "~1.3.0",
"joe-reporter-console": "~1.2.1"
},
"directories": {
"lib": "./out/lib"
},
"scripts": {
"test": "node ./out/test/everything.test.js"
},
"bin": {
"cson2json": "./bin/cson2json",
"json2cson": "./bin/json2cson"
},
"main": "./out/lib/cson"
}
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