.test() - DarthJDG/Mangler.js GitHub Wiki

Checks if any of the items pass the test.

.test(test)
Parameter Type Default Description
test Test {} The test expression to check the items against.

Returns

Returns true if there is at least one item in the mangler object which passes the test, false if none of them pass.


For more information on test expressions, see Mangler.test().

Example

m = Mangler([1, 2, 3, 4]);

m.test({ $eq: 3 });     // Returns true
m.test({ $gt: 4 });     // Returns false
⚠️ **GitHub.com Fallback** ⚠️