api-doc-validator
Advanced tools
Comparing version 2.17.0 to 2.18.0
@@ -6,7 +6,13 @@ module.exports = function (data) { | ||
module.exports.prepare = function (schema) { | ||
var name; | ||
let name, local = false; | ||
if (typeof schema === 'string') { | ||
name = /^\s*([\w.]+)\s*=/.exec(schema); | ||
name = name && name[1]; | ||
name = /^\s*(const\s+|let\s+|var\s+)?([$\w.]+)\s*=/.exec(schema); | ||
local = !!(name && name[1]); | ||
if (local) { | ||
schema = schema.replace(name[1], ''); | ||
} | ||
name = name && name[2]; | ||
} | ||
@@ -25,2 +31,3 @@ else if (typeof schema === 'function') { | ||
return { | ||
local, | ||
name, | ||
@@ -27,0 +34,0 @@ schema, |
{ | ||
"name": "api-doc-validator", | ||
"version": "2.17.0", | ||
"version": "2.18.0", | ||
"description": "api doc and validator", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
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
64010
1807