stringArray = [
'Steve 34',
'Kate 56',
'Dave 12',
'Steve 12',
'Bob 78',
'Alejandro 90'
]
hx.filter.contains(stringArray, 've') // returns ['Dave 12', 'Steve 12', 'Steve 34'];
hx.filter.startsWith(stringArray, 's') // returns ['Steve 12', 'Steve 34'];
hx.filter.exact(stringArray, 'Bob') // returns [];
hx.filter.exact(stringArray, 'Bob 78') // returns ['Bob 78'];
hx.filter.fuzzy(stringArray, 'e1') // returns ['Dave 12', 'Steve 12'];
hx
object. array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.contains(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.contains(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.exact(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.exact(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.excludes(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.excludes(array, 'bob', {searchValues: getValues});
array = ['Bob Stevenson', 'Steve Stevenson', 'Dave Peters']
hx.filter.fuzzy(array, 'ss') // returns ['Steve Stevenson', 'Bob Stevenson'] as the match in Steve Stevenson is stronger.
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.fuzzy(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.fuzzy(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.greater(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.greater(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.less(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.less(array, 'bob', {searchValues: getValues});
/bob/ //RegEx string
new RegExp('bob') // RegEx Object
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.regex(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.regex(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filter.startsWith(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filter.startsWith(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterContains(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterContains(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterExact(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterExact(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterExcludes(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterExcludes(array, 'bob', {searchValues: getValues});
array = ['Bob Stevenson', 'Steve Stevenson', 'Dave Peters']
hx.filterFuzzy(array, 'ss') // returns ['Steve Stevenson', 'Bob Stevenson'] as the match in Steve Stevenson is stronger.
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterFuzzy(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterFuzzy(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterGreater(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterGreater(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterLess(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterLess(array, 'bob', {searchValues: getValues});
/bob/ //RegEx string
new RegExp('bob') // RegEx Object
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterRegex(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterRegex(array, 'bob', {searchValues: getValues});
array = [
{
name: 'Bob',
age: 12
}
...
];
getValues = function(item){
return [item.name, item.age] // would return ['Bob', 12] for the selected array
};
hx.filterStartsWith(array, 'bob', {searchValues: getValues});
array = [
['Bob', 12]
...
];
getValues = function(item){
return item;
};
hx.filterStartsWith(array, 'bob', {searchValues: getValues});