-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update rollup-config-module to adapt to .mjs-based ecosystem * update @shinnn/eslint-config and follow its coding rules, for example tab indent * switch from istanbul to nyc
- Loading branch information
Showing
9 changed files
with
4,327 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.nyc_output | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
dist: trusty | ||
git: | ||
depth: 1 | ||
branches: | ||
except: /^v\d/ | ||
language: node_js | ||
node_js: node | ||
after_script: | ||
- npm install istanbul-coveralls | ||
- node node_modules/.bin/istanbul-coveralls | ||
after_script: node_modules/.bin/nyc report --reporter=text-lcov | npx coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import arrIndexesOf from 'arr-indexes-of'; | ||
|
||
export default function repetitionRanges(arr, value) { | ||
var indexes = arrIndexesOf(arr, value); | ||
|
||
var results = []; | ||
var i = 0; | ||
var start = null; | ||
|
||
while (i < indexes.length) { | ||
if (indexes[i] === indexes[i + 1] - 1) { | ||
if (start === null) { | ||
start = indexes[i]; | ||
} | ||
} else if (start !== null) { | ||
results.push({ | ||
start: start, | ||
end: indexes[i] | ||
}); | ||
|
||
start = null; | ||
} | ||
|
||
i += 1; | ||
} | ||
|
||
return results; | ||
} |
Oops, something went wrong.