@flourish/filter
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -85,3 +85,3 @@ (function (global, factory) { | ||
var filter_value = obj[filter_prop]; | ||
if (!filter_value) return false; | ||
if (filter_value === undefined) return false; | ||
if (index < (filter_level-1)) { | ||
@@ -145,4 +145,4 @@ if (!parent.hasOwnProperty(filter_value)){ // path not currently in tree | ||
var extracateData = function(_filters){ | ||
if ( typeof _filters === "string" ) _filters = [_filters]; | ||
var filters = _filters.slice(); | ||
if (typeof _filters === "string") _filters = [_filters]; | ||
var filters = _filters.slice().filter(function(x) {return x !== undefined;}); | ||
if (filters.length > filter_level) filters.length = filter_level; | ||
@@ -149,0 +149,0 @@ var extractee = find(filters); |
{ | ||
"name": "@flourish/filter", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Reusable filter and optional aggregator", | ||
@@ -5,0 +5,0 @@ "main": "filter.js", |
@@ -49,3 +49,3 @@ import { aggregators } from "./aggregators"; | ||
var filter_value = obj[filter_prop]; | ||
if (!filter_value) return false; | ||
if (filter_value === undefined) return false; | ||
if (index < (filter_level-1)) { | ||
@@ -109,4 +109,4 @@ if (!parent.hasOwnProperty(filter_value)){ // path not currently in tree | ||
var extracateData = function(_filters){ | ||
if ( typeof _filters === "string" ) _filters = [_filters]; | ||
var filters = _filters.slice(); | ||
if (typeof _filters === "string") _filters = [_filters]; | ||
var filters = _filters.slice().filter(function(x) {return x !== undefined;}); | ||
if (filters.length > filter_level) filters.length = filter_level; | ||
@@ -113,0 +113,0 @@ var extractee = find(filters); |
1511220