+4
-0
@@ -0,1 +1,5 @@ | ||
| v1.3.0 - August 22, 2016 | ||
| * 12c7ad9 Update: Add support for numeric and string literal types (fixes #156) (#172) (Andrew Walter) | ||
| v1.2.3 - August 16, 2016 | ||
@@ -2,0 +6,0 @@ |
+29
-1
@@ -44,3 +44,5 @@ /* | ||
| NameExpression: 'NameExpression', | ||
| TypeApplication: 'TypeApplication' | ||
| TypeApplication: 'TypeApplication', | ||
| StringLiteralType: 'StringLiteralType', | ||
| NumericLiteralType: 'NumericLiteralType' | ||
| }; | ||
@@ -466,2 +468,6 @@ | ||
| case 0x2D: /* '-' */ | ||
| token = scanNumber(); | ||
| return token; | ||
| default: | ||
@@ -893,2 +899,16 @@ if (esutils.code.isDecimalDigit(ch)) { | ||
| case Token.STRING: | ||
| next(); | ||
| return { | ||
| type: Syntax.StringLiteralType, | ||
| value: value | ||
| }; | ||
| case Token.NUMBER: | ||
| next(); | ||
| return { | ||
| type: Syntax.NumericLiteralType, | ||
| value: value | ||
| }; | ||
| default: | ||
@@ -1226,2 +1246,10 @@ utility.throwError('unexpected token'); | ||
| case Syntax.StringLiteralType: | ||
| result = '"' + node.value + '"'; | ||
| break; | ||
| case Syntax.NumericLiteralType: | ||
| result = String(node.value); | ||
| break; | ||
| default: | ||
@@ -1228,0 +1256,0 @@ utility.throwError('Unknown type ' + node.type); |
+1
-1
@@ -6,3 +6,3 @@ { | ||
| "main": "lib/doctrine.js", | ||
| "version": "1.2.3", | ||
| "version": "1.3.0", | ||
| "engines": { | ||
@@ -9,0 +9,0 @@ "node": ">=0.10.0" |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
93397
0.91%1908
1.22%0
-100%8
14.29%