Remove items from an object based on a predicate.
Array manipulation, ordering, searching, summarizing, etc.
Type-safe implementation of invariant with positionals.
Return a function which tests if every element in an array passes a test condition.
A library for expressing filter predicates and evaluating them against values
Disables scroll outside of `children` node.
A set of predicate functions to improve your value testing and comparisons.
A way to re-run Cypress commands until a predicate function returns true
A term-predicate function-factory actor
Nanoscale assertion module
Low-level HTTP/HTTPS/XHR/fetch request interception library.
Removes body scroll without content _shake_
A collection of utilities for JavaScript arrays
Converts RDF/JS Terms, Quads and Datasets to N-Triple strings
Simple `and` and `or` functional programming predicates
unist utility to remove positions from a tree
Utils to manage your React Children; find and filter children by type or custom function, enforce child content, and more!
Remove JSX empty expression
The Glitch word list, packaged into an NPM module for easy use.
Like Array#findIndex but searches the array backwards.
A convenience constructor for RDF quads
lezer-based HTML grammar
Remove the trailing spaces from a string.
Remove JSX attribute
Restores response predicates removed from ActionDispatch::TestResponse in Rails 6
== Synopsys Ruby Enumerable extension. Main idea is lazy computations within enumerators. == Usage Install as a gem: sudo gem install deferred_enum This gem introduces DeferredEnumerator class: ary = [1, 2, 3, 4] deferred = ary.defer # #<DeferredEnumerator: [1, 2, 3, 4]:each> DeferredEnumerator brings some optimizations to all?, any? and none? predicates deferred.all?(&:even?) # Will stop iteration after first false-result = 1 iteration deferred.none?(&:even?) # 2 iterations deferred.any?(&:even?) # 2 iterations It also introduces lazy versions of Enumerable's #select, #map and #reject methods deferred.map { |i| i + 1 } # #<DeferredEnumerator: #<Enumerator::Generator>:each> deferred.select { |i| i.even? } # #<DeferredEnumerator: #<Enumerator::Generator>:each> deferred.reject { |i| i.odd? } # #<DeferredEnumerator: #<Enumerator::Generator>:each> So you can safely chain your filters, they won't be treated as arrays: deferred.map(&:succ).select(&:even?) # #<DeferredEnumerator: #<Enumerator::Generator>:each> You can build chains of Enumerables: deferred.concat([2]).to_a # [1, 2, 3, 4, 2] Or append elements to the end of enumerator: deferred << 2 You can even remove duplicates from enumerator, though this operation can be tough: deferred.uniq # #<DeferredEnumerator: #<Enumerator::Generator>:each> There are many other methods in DeferredEnumerator, please refer to documentation.