Socket
Socket
Sign inDemoInstall

catharsis

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

catharsis - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

9

bin/parseType.js

@@ -12,6 +12,11 @@ #!/usr/bin/env node

var typeExpression = process.argv[2];
var jsdoc = process.argv[3] === '--jsdoc' ? true : false;
var parsedType;
var opts = {
jsdoc: jsdoc
};
function usage() {
console.log(util.format('Usage:\n %s [typeExpression]', command));
console.log(util.format('Usage:\n %s typeExpression [--jsdoc]', command));
}

@@ -24,3 +29,3 @@

try {
parsedType = catharsis.parse(typeExpression);
parsedType = catharsis.parse(typeExpression, opts);
} catch (e) {

@@ -27,0 +32,0 @@ console.error(util.format('Unable to parse "%s" (exception follows):', typeExpression));

{
"version": "0.5.1",
"version": "0.5.2",
"name": "catharsis",

@@ -4,0 +4,0 @@ "description": "A JavaScript parser for Google Closure Compiler and JSDoc type expressions.",

@@ -146,2 +146,4 @@ # Catharsis #

+ 0.5.2 (March 2013): The `parse()` method now correctly parses function types when JSDoc-style type
expressions are enabled.
+ 0.5.1 (March 2013): Newlines and extra spaces are now removed from type expressions before they

@@ -148,0 +150,0 @@ are parsed.

@@ -171,3 +171,21 @@ 'use strict';

}
},
{
description: 'standard function type (should still parse if JSDoc expressions are allowed)',
expression: 'function(this:my.namespace.Class, my.Class)=',
parsed: {
type: Types.FunctionType,
params: [
{
type: Types.NameExpression,
name: 'my.Class'
}
],
'this': {
type: Types.NameExpression,
name: 'my.namespace.Class'
},
optional: true
}
}
];

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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