Comparing version 0.8.7 to 0.8.8
@@ -230,5 +230,9 @@ 'use strict'; | ||
function getApplicationKey(applications) { | ||
function getApplicationKey(type, applications) { | ||
if (applications.length === 1) { | ||
return 'array'; | ||
if (/[Aa]rray/.test(type.expression.name)) { | ||
return 'array'; | ||
} else { | ||
return 'other'; | ||
} | ||
} else if (/[Ss]tring/.test(applications[0].name)) { | ||
@@ -246,3 +250,3 @@ // object with string keys | ||
var context = new Context(); | ||
var key = 'application.' + getApplicationKey(applications); | ||
var key = 'application.' + getApplicationKey(type, applications); | ||
var result = new Result(); | ||
@@ -253,2 +257,3 @@ var self = this; | ||
context.type = this.type(type.expression).description; | ||
context.application = this.type(applications.pop()).description; | ||
@@ -255,0 +260,0 @@ context.keyApplication = applications.length ? this.type(applications.pop()).description : ''; |
{ | ||
"version": "0.8.7", | ||
"version": "0.8.8", | ||
"name": "catharsis", | ||
@@ -4,0 +4,0 @@ "description": "A JavaScript parser for Google Closure Compiler and JSDoc type expressions.", |
@@ -6,3 +6,4 @@ { | ||
"object": "<%= prefix %> <%= codeTagOpen %>Object<%= codeTagClose %> with <%= application %> properties <%= suffix %>", | ||
"objectNonString": "<%= prefix %> <%= codeTagOpen %>Object<%= codeTagClose %> with <%= keyApplication %> keys and <%= application %> properties <%= suffix %>" | ||
"objectNonString": "<%= prefix %> <%= codeTagOpen %>Object<%= codeTagClose %> with <%= keyApplication %> keys and <%= application %> properties <%= suffix %>", | ||
"other": "<%= prefix %> <%= codeTagOpen %><%= type %> containing <%= application %> <%= suffix %>" | ||
}, | ||
@@ -9,0 +10,0 @@ "function": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
331495
10
6784
1
0