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.5 to 0.5.6

2

package.json
{
"version": "0.5.5",
"version": "0.5.6",
"name": "catharsis",

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

@@ -38,3 +38,3 @@ # Catharsis #

try {
jsdocType = 'number|string'; // Closure Compiler expects (number|string)
jsdocType = 'string[]'; // Closure Compiler expects Array.<string>
parsedJsdocType = catharsis.parse(jsdocType, {jsdoc: true});

@@ -47,4 +47,4 @@ }

console.log(catharsis.stringify(parsedType)); // !Object
console.log(catharsis.stringify(parsedJsdocType)); // number|string
console.log(catharsis.stringify(parsedJsdocType, // (number|string)
console.log(catharsis.stringify(parsedJsdocType)); // string[]
console.log(catharsis.stringify(parsedJsdocType, // Array.<string>
{restringify: true}));

@@ -67,2 +67,4 @@

+ The string `function` is treated as a function type with no parameters.
+ In a function type with repeatable parameters, the names of repeatable parameters are not required
to be enclosed in square brackets (for example, `function(...foo)` is allowed).
+ The period may be omitted from type applications. For example, `Array.<string>` and

@@ -72,5 +74,5 @@ `Array<string>` will be parsed in the same way.

application with the expression `Array` (for example, `Array.<string>`).
+ The enclosing parentheses may be omitted from type unions. For example, `(number|string)` and
`number|string` will be parsed in the same way.
+ Name expressions may contain the characters `#`, `~`, `:`, and `/`.
+ Name expressions may contain a suffix that is similar to a function signature (for example,
`MyClass(foo, bar)`).
+ Name expressions may contain a reserved word.

@@ -150,2 +152,10 @@ + Record types may use types other than name expressions for keys.

+ 0.5.6 (April 2013):
+ For consistency with Google Closure Library, parentheses are no longer required around type
unions. (In previous versions, the parentheses could be omitted when JSDoc support was enabled.)
+ For consistency with Google Closure Library, you can now use postfix notation for the `?`
(nullable) and `!` (non-nullable) modifiers. For example, `?string` and `string?` are now
treated as equivalent.
+ String literals and numeric literals are now allowed as property names within name
expressions. For example, the name expression `Foo."bar"` is now parsed correctly.
+ 0.5.5 (April 2013): Corrected a parsing issue with name expressions that end with a value enclosed

@@ -152,0 +162,0 @@ in parentheses.

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

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