diff --git a/.all-contributorsrc b/.all-contributorsrc
index 01948560b..38bcc285f 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -343,6 +343,16 @@
"contributions": [
"bug"
]
+ },
+ {
+ "login": "wayfarer3130",
+ "name": "Bill Wallace",
+ "avatar_url": "https://avatars.githubusercontent.com/u/27778909?v=4",
+ "profile": "https://github.com/wayfarer3130",
+ "contributions": [
+ "code",
+ "doc"
+ ]
}
],
"contributorsPerLine": 7
diff --git a/README.md b/README.md
index f066fbc14..a3d60ea8f 100755
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
[![Build Status][build-badge]][build]
[![Coverage Status][coverage-badge]][coverage]
-[![All Contributors](https://img.shields.io/badge/all_contributors-34-orange.svg?style=flat-square)](#contributors)
+[![All Contributors](https://img.shields.io/badge/all_contributors-35-orange.svg?style=flat-square)](#contributors)
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
@@ -164,7 +164,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Gustavo AndrΓ© Lelis](https://github.com/galelis)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=galelis "Code") | [
Kofifus](https://github.com/kofifus)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kofifus "Code") [π§](#tool-kofifus "Tools") [π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Akofifus "Bug reports") | [
AloΓ―s Dreyfus](http://www.linkedin.com/in/alois-dreyfus/)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=adreyfus "Code") | [
Tim Leslie](http://www.timl.id.au)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=timleslie "Code") | [
diego0020](https://github.com/diego0020)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=diego0020 "Code") | [
Evren Ozkan](https://github.com/evren217)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=evren217 "Code") | [
Salvador Daniel Pelayo](https://github.com/daniel2101)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=daniel2101 "Code") |
| [
Juan Narvaez](https://github.com/jdnarvaez)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=jdnarvaez "Code") | [
Mike](https://github.com/mikehazell)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Documentation") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Code") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Tests") | [
Sangkeun Kim](http://sisobus.com)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=sisobus "Code") [π¬](#question-sisobus "Answering Questions") | [
Victor Saase](https://github.com/vsaase)
[π€](#ideas-vsaase "Ideas, Planning, & Feedback") | [
Michael Wasser](http://www.mikewasser.com)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=untoldone "Documentation") | [
Amandeep Singh](https://github.com/singhArmani)
[π](#content-singhArmani "Content") | [
Madison Dickson](http://mix3dstudios.com)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mix3d "Documentation") |
| [
Kevin Lee Drum](https://github.com/kevinleedrum)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kevinleedrum "Code") | [
Makarand Bauskar](https://github.com/mmbauskar)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mbauskar "Code") | [
Biharck Araujo](http://www.biharck.com.br)
[π‘](#example-biharck "Examples") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=biharck "Documentation") | [
Devon Bernard](https://www.linkedin.com/in/devonbernard)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=DevonBernard "Documentation") | [
Karl-Heinrich](https://github.com/Karl-Heinrich)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3AKarl-Heinrich "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Code") [β οΈ](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Tests") | [
counterxing](https://blog.xingbofeng.com/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Axingbofeng "Bug reports") [π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=xingbofeng "Code") | [
Jorge Lopes](https://github.com/jlopes90)
[π¬](#question-jlopes90 "Answering Questions") |
-| [
Gabriel Garrido](http://garrido.io)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Ggpsv "Code") | [
ASVBPREAUBV](https://github.com/ASVBPREAUBV)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=ASVBPREAUBV "Documentation") | [
frolic06](https://github.com/frolic06)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=frolic06 "Code") | [
codepage949](https://github.com/codepage949)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=codepage949 "Code") | [
Asherah Connor](https://kivikakk.ee)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kivikakk "Code") | [
Ikko Ashimine](https://bandism.net/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Aeltociear "Bug reports") |
+| [
Gabriel Garrido](http://garrido.io)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Ggpsv "Code") | [
ASVBPREAUBV](https://github.com/ASVBPREAUBV)
[π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=ASVBPREAUBV "Documentation") | [
frolic06](https://github.com/frolic06)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=frolic06 "Code") | [
codepage949](https://github.com/codepage949)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=codepage949 "Code") | [
Asherah Connor](https://kivikakk.ee)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kivikakk "Code") | [
Ikko Ashimine](https://bandism.net/)
[π](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Aeltociear "Bug reports") | [
Bill Wallace](https://github.com/wayfarer3130)
[π»](https://github.com/cornerstonejs/cornerstoneTools/commits?author=wayfarer3130 "Code") [π](https://github.com/cornerstonejs/cornerstoneTools/commits?author=wayfarer3130 "Documentation") |
This project follows the [all-contributors][all-contributors] specification.
diff --git a/src/stackTools/stackPrefetch.js b/src/stackTools/stackPrefetch.js
index ebab9df84..44188948b 100755
--- a/src/stackTools/stackPrefetch.js
+++ b/src/stackTools/stackPrefetch.js
@@ -40,32 +40,20 @@ function range(lowEnd, highEnd) {
return arr;
}
-const max = function(arr) {
- return Math.max.apply(null, arr);
-};
-
-const min = function(arr) {
- return Math.min.apply(null, arr);
-};
-
function nearestIndex(arr, x) {
// Return index of nearest values in array
// http://stackoverflow.com/questions/25854212/return-index-of-nearest-values-in-an-array
- const l = [];
- const h = [];
-
- arr.forEach(function(v) {
+ let low = 0;
+ let high = arr.length - 1;
+ arr.forEach((v, idx) => {
if (v < x) {
- l.push(v);
+ low = Math.max(idx, low);
} else if (v > x) {
- h.push(v);
+ high = Math.min(idx, high);
}
});
- return {
- low: arr.indexOf(max(l)),
- high: arr.indexOf(min(h)),
- };
+ return { low, high };
}
function prefetch(element) {
diff --git a/src/util/uuidv4.js b/src/util/uuidv4.js
index aa9d2f7ce..19ddd7433 100644
--- a/src/util/uuidv4.js
+++ b/src/util/uuidv4.js
@@ -1,7 +1,7 @@
export default function uuidv4() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
- let r = (Math.random() * 16) | 0,
- v = c == 'x' ? r : (r & 0x3) | 0x8;
+ const r = (Math.random() * 16) | 0; // eslint-disable-line no-bitwise
+ const v = c === 'x' ? r : (r & 0x3) | 0x8; // eslint-disable-line no-bitwise
return v.toString(16);
});