Skip to content

Instantly share code, notes, and snippets.

View Geobuddy's full-sized avatar
💻
Coding...

Adilson Geobuddy

💻
Coding...
  • London
View GitHub Profile
@xhinking
xhinking / print_filter.js
Created March 4, 2014 07:25
Crossfilter & dc filter printer source: codeproject
function print_filter(filter) {
var f=eval(filter);
if (typeof(f.length) != "undefined") {}else{}
if (typeof(f.top) != "undefined") {f=f.top(Infinity);}else{}
if (typeof(f.dimension) != "undefined") {f=f.dimension(function(d) { return "";}).top(Infinity);}else{}
console.log(filter+"("+f.length+") = "+JSON.stringify(f).replace("[","[\n\t").replace(/}\,/g,"},\n\t").replace("]","\n]"));
}