Socket
Socket
Sign inDemoInstall

catharsis

Package Overview
Dependencies
0
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0 to 0.5.1

6

catharsis.js
/**
* catharsis 0.4.2
* Catharsis
* A parser for Google Closure Compiler type expressions, powered by PEG.js.

@@ -104,2 +104,6 @@ *

typeExpr = typeExpr.replace(/[\r\n]/g, '')
.replace(/\s+/g, ' ')
.trim();
return cachedParse(typeExpr, options);

@@ -106,0 +110,0 @@ };

2

package.json
{
"version": "0.5.0",
"version": "0.5.1",
"name": "catharsis",

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

@@ -105,5 +105,5 @@ # Catharsis #

name expression matches a key in `options.links`, the name expression will be wrapped in an
HTML <a> tag that links to the URI. If `options.cssClass` is specified, the <a> tag will include
a `class` attribute. **Note**: When using this option, parsed types are always restringified,
and the resulting string is not cached.
HTML `<a>` tag that links to the URI. If `options.cssClass` is specified, the `<a>` tag will
include a `class` attribute. **Note**: When using this option, parsed types are always
restringified, and the resulting string is not cached.
+ `options.restringify`: Forces Catharsis to restringify the parsed type. If this option is not

@@ -147,2 +147,4 @@ specified, and the parsed type object includes a `typeExpression` property, Catharsis will

+ 0.5.1 (March 2013): Newlines and extra spaces are now removed from type expressions before they
are parsed.
+ 0.5.0 (March 2013):

@@ -149,0 +151,0 @@ + The `parse()` method's `lenient` option has been renamed to `jsdoc`. **Note**: This change is

@@ -82,2 +82,7 @@ /*global describe: true, it: true, xit: true */

});
it('should strip newlines before parsing a type expression', function() {
var parsed = catharsis.parse('My\rNew\nClass\r\n');
parsed.name.should.equal('MyNewClass');
});
});

@@ -84,0 +89,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc