You've already forked wakapi-readme-stats
Bar graph added.
This commit is contained in:
33
node_modules/d3-array/src/bisector.js
generated
vendored
Normal file
33
node_modules/d3-array/src/bisector.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import ascending from "./ascending.js";
|
||||
|
||||
export default function(compare) {
|
||||
if (compare.length === 1) compare = ascendingComparator(compare);
|
||||
return {
|
||||
left: function(a, x, lo, hi) {
|
||||
if (lo == null) lo = 0;
|
||||
if (hi == null) hi = a.length;
|
||||
while (lo < hi) {
|
||||
var mid = lo + hi >>> 1;
|
||||
if (compare(a[mid], x) < 0) lo = mid + 1;
|
||||
else hi = mid;
|
||||
}
|
||||
return lo;
|
||||
},
|
||||
right: function(a, x, lo, hi) {
|
||||
if (lo == null) lo = 0;
|
||||
if (hi == null) hi = a.length;
|
||||
while (lo < hi) {
|
||||
var mid = lo + hi >>> 1;
|
||||
if (compare(a[mid], x) > 0) hi = mid;
|
||||
else lo = mid + 1;
|
||||
}
|
||||
return lo;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function ascendingComparator(f) {
|
||||
return function(d, x) {
|
||||
return ascending(f(d), x);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user