Skip to content

Commit

Permalink
Merge branch 'fix-untyped'
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondavies committed Nov 21, 2013
2 parents d3b2e4a + e03cefb commit f4bff71
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 9 deletions.
21 changes: 17 additions & 4 deletions crossfilter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(function(exports){
crossfilter.version = "1.3.5";
crossfilter.version = "1.3.6";
function crossfilter_identity(d) {
return d;
}
Expand Down Expand Up @@ -439,8 +439,8 @@ var quicksort_sizeThreshold = 32;
var crossfilter_array8 = crossfilter_arrayUntyped,
crossfilter_array16 = crossfilter_arrayUntyped,
crossfilter_array32 = crossfilter_arrayUntyped,
crossfilter_arrayLengthen = crossfilter_identity,
crossfilter_arrayWiden = crossfilter_identity;
crossfilter_arrayLengthen = crossfilter_arrayLengthenUntyped,
crossfilter_arrayWiden = crossfilter_arrayWidenUntyped;

if (typeof Uint8Array !== "undefined") {
crossfilter_array8 = function(n) { return new Uint8Array(n); };
Expand All @@ -467,7 +467,20 @@ if (typeof Uint8Array !== "undefined") {
}

function crossfilter_arrayUntyped(n) {
return new Array(n);
var array = new Array(n), i = -1;
while (++i < n) array[i] = 0;
return array;
}

function crossfilter_arrayLengthenUntyped(array, length) {
var n = array.length;
while (n < length) array[n++] = 0;
return array;
}

function crossfilter_arrayWidenUntyped(array, width) {
if (width > 32) throw new Error("invalid array width!");
return array;
}
function crossfilter_filterExact(bisect, value) {
return function(values) {
Expand Down
2 changes: 1 addition & 1 deletion crossfilter.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crossfilter",
"version": "1.3.5",
"version": "1.3.6",
"description": "Fast multidimensional filtering for coordinated views.",
"keywords": [
"square",
Expand Down
Loading

0 comments on commit f4bff71

Please sign in to comment.