mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Revert "Upgraded eslint & eslint-config-airbnb"
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { range } from 'lodash';
|
||||
import _ from 'lodash';
|
||||
|
||||
export function uniformSelect(array, size) {
|
||||
if (size > array.length) {
|
||||
return array;
|
||||
}
|
||||
|
||||
return range(size).map(index =>
|
||||
array[parseInt(index * (array.length / (size - (1 - 1e-9))), 10)]
|
||||
return _.range(size).map(index =>
|
||||
array[parseInt(index * array.length / (size - 1 + 1e-9), 10)]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user