get-source
Advanced tools
Comparing version 1.0.33 to 1.0.34
@@ -105,8 +105,15 @@ "use strict"; | ||
// Node v4 does not support destructuring... | ||
// const [,url] = this.text.match (/\u0023 sourceMappingURL=(.+)\n?/) || [undefined, undefined] // escape #, otherwise it will match this exact line.. %) | ||
const match = this.text.match (/\u0023 sourceMappingURL=(.+)\n?/) || [undefined, undefined] // escape #, otherwise it will match this exact line.. %) | ||
, url = match[1] | ||
/* Extract the last sourceMap occurence (TODO: support multiple sourcemaps) */ | ||
const re = /\u0023 sourceMappingURL=(.+)\n?/g | ||
let lastMatch = undefined | ||
while (true) { | ||
const match = re.exec (this.text) | ||
if (match) lastMatch = match | ||
else break | ||
} | ||
const url = lastMatch && lastMatch[1] | ||
if (url) { | ||
@@ -113,0 +120,0 @@ |
{ | ||
"name": "get-source", | ||
"version": "1.0.33", | ||
"version": "1.0.34", | ||
"description": "Platform-agnostic source code inspection, with sourcemaps support", | ||
@@ -5,0 +5,0 @@ "main": "get-source", |
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
366
26282