diff options
Diffstat (limited to 'development/sourcemap-validator.js')
-rw-r--r-- | development/sourcemap-validator.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/development/sourcemap-validator.js b/development/sourcemap-validator.js index edc97667a..a85547058 100644 --- a/development/sourcemap-validator.js +++ b/development/sourcemap-validator.js @@ -11,7 +11,7 @@ const { SourceMapConsumer } = require('source-map') start() -async function start() { +async function start () { const rawBuild = fs.readFileSync(__dirname + '/../dist/chrome/inpage.js', 'utf8') const rawSourceMap = fs.readFileSync(__dirname + '/../dist/sourcemaps/inpage.js.map', 'utf8') const consumer = await new SourceMapConsumer(rawSourceMap) @@ -34,7 +34,7 @@ async function start() { if (result.source === 'node_modules/web3/dist/web3.min.js') return // minified mess const sourceContent = consumer.sourceContentFor(result.source) const sourceLines = sourceContent.split('\n') - const line = sourceLines[result.line-1] + const line = sourceLines[result.line - 1] console.log(`\n========================== ${result.source} ====================================\n`) console.log(line) console.log(`\n==============================================================================\n`) @@ -42,8 +42,8 @@ async function start() { }) } -function indicesOf(substring, string) { - var a=[],i=-1; - while((i=string.indexOf(substring,i+1)) >= 0) a.push(i); - return a; +function indicesOf (substring, string) { + var a = [], i = -1 + while ((i = string.indexOf(substring, i + 1)) >= 0) a.push(i) + return a } |