diff options
author | brunobar79 <brunobar79@gmail.com> | 2018-07-03 06:49:33 +0800 |
---|---|---|
committer | brunobar79 <brunobar79@gmail.com> | 2018-07-03 06:49:33 +0800 |
commit | a8f745f9fe74751b87f500af3857b66d4c80f45e (patch) | |
tree | f4f09d2b4227b35a6d2fd996113d36a8aa658ddd /development/sourcemap-validator.js | |
parent | cc11a623972acf707291d7b42d9dc2f8d7006e20 (diff) | |
download | tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.gz tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.bz2 tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.lz tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.xz tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.tar.zst tangerine-wallet-browser-a8f745f9fe74751b87f500af3857b66d4c80f45e.zip |
eslint --fix .
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 } |