Scan through a list of objects, removing those which match a predicate. Similar to jQuery.grep, only acts on the list in-place by removal, rather than by creating a new list by inclusion. Code Block |
---|
| javascript |
---|
| javascript |
---|
bgColor | white |
---|
borderStyle | nonejavascript |
---|
|
fluid.remove_if(source, fn);
|
File name: Fluid.js Parameters Span |
---|
| source
| (Array or Object) The list of objects to be scanned over. | fn
| (Type) A predicate function determining whether an element should be removed. This accepts the standard signature (object, index) and returns a "truthy" result to indicate that the supplied object should be removed from the list. |
|
Return Value Span |
---|
| (Array or Object) | The source , transformed by the operation of removing the matched elements. The supplied list is modified by this operation.. |
|
|