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

season

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

season - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

23

lib/csonc.js
(function() {
var CSON, path, _;
var CSON, optimist, path, _;

@@ -8,6 +8,8 @@ path = require('path');

optimist = require('optimist');
CSON = require('./cson');
module.exports = function(argv) {
var e, inputFile, object, outputFile, outputName;
var e, inputFile, object, options, outputFile, outputName, _ref;

@@ -17,7 +19,11 @@ if (argv == null) {

}
inputFile = argv[0], outputFile = argv[1];
options = optimist(argv);
options.usage('Usage: csonc <inputFile> [<outputFile>]');
options.alias('r', 'root').boolean('r').describe('r', 'Require that the input file contain an object at the root.')["default"]('r', false);
argv = options.argv;
_ref = argv._, inputFile = _ref[0], outputFile = _ref[1];
if ((inputFile != null ? inputFile.length : void 0) > 0) {
inputFile = path.resolve(process.cwd(), inputFile);
} else {
console.error("Input file must be first argument");
options.showHelp(console.error);
process.exit(1);

@@ -34,5 +40,12 @@ return;

object = CSON.readFileSync(inputFile);
if (argv.r) {
if (!_.isObject(object) || _.isArray(object)) {
console.error("" + inputFile + " does not contain a root object");
process.exit(1);
return;
}
}
} catch (_error) {
e = _error;
console.error("File does not contain valid CoffeeScript: " + inputFile);
console.error("Parsing " + inputFile + " failed:", e.message);
process.exit(1);

@@ -39,0 +52,0 @@ }

{
"name": "season",
"version": "0.5.0",
"version": "0.6.0",
"description": "CSON utilities",

@@ -32,3 +32,4 @@ "licenses": [

"underscore": "~1.4.4",
"coffee-script": "~1.6.2"
"coffee-script": "~1.6.2",
"optimist": "~0.4.0"
},

@@ -35,0 +36,0 @@ "devDependencies": {

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