A minimalist implementation of type-aware matching based on generic predicates.
Fast robust predicates for computational geometry
A little library for asserting types and values, with zero dependencies.
A library for expressing filter predicates and evaluating them against values
Tools for manipulating ApiDOM structures.
OpenAPI 3.1.x namespace for ApiDOM.
API Design Systems 2021-05-07 namespace for ApiDOM.
OpenAPI 2.0 namespace for ApiDOM.
JSON Schema 2020-12 namespace for ApiDOM.
Arazzo Specification 1.0.1 namespace for ApiDOM.
JSON Schema 2019-09 namespace for ApiDOM.
AsyncAPI 3.x.y namespace for ApiDOM.
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
OpenAPI 3.2.x namespace for ApiDOM.
DSL that enables you to navigate and find data within your JSON documents
OpenTelemetry instrumentation for `generic-pool` resource pool for managing expensive resources
Shared useful utils and types
Schematics specific to Angular
This monorepo's version of "lodash". This package contains shared generic utilities that can be used within the ecosystem. This package should not have dependencies, and should not contain any references to the Analytics domain.
Workflows Specification 1.0.0 namespace for ApiDOM.
Set of various predicates for type checking, assertions, filtering etc
A set of predicate functions to improve your value testing and comparisons.
Simple runtime TypeScript validator library
JSON Schema Draft 7 namespace for ApiDOM.
A taste of what const generics could enable in the future
A taste of what const generics could enable in the future
Adds automatic generation of predicate methods for attributes
RConditions generates a bang method (for example, Array#empty!) for each predicate method (for example, Array#empty?). The bang method will return true if the predicate method returns true, otherwise it will throw an exception. The exception will include auto-generated modules that give information on predicate methods passed or failed in the bang method's execution.
Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail. The Wrong idea is to replace all those countless assert_this, assert_that library methods which only exist to give a more useful failure message than "assertion failed". Wrong replaces all of them in one fell swoop, since if you can write it in Ruby, Wrong can make a sensible failure message out of it. Also provided are several helper methods, like rescuing, capturing, and d.
MetaWhere offers the ability to call any Arel predicate methods (with a few convenient aliases) on your Model's attributes instead of the ones normally offered by ActiveRecord's hash parameters. It also adds convenient syntax for order clauses, smarter mapping of nested hash conditions, and a debug_sql method to see the real SQL your code is generating without running it against the database. If you like the new AR 3.0 query interface, you'll love it with MetaWhere.
InquiryAttrs wraps ActiveRecord/ActiveModel (and StoreModel/Dry::Struct) attributes with predicate-style inquiry methods. Write user.status.active? instead of user.status == "active". Blank/nil values safely return false for every predicate — no more NoMethodError on nil. Run `rails inquiry_attrs:install` to generate an initializer that auto-includes the concern into every ActiveRecord model.
MetaWhere offers the ability to call any Arel predicate methods (with a few convenient aliases) on your Model's attributes instead of the ones normally offered by ActiveRecord's hash parameters. It also adds convenient syntax for order clauses, smarter mapping of nested hash conditions, and a debug_sql method to see the real SQL your code is generating without running it against the database. If you like the new AR 3.0 query interface, you'll love it with MetaWhere.
MetaWhere offers the ability to call any Arel predicate methods (with a few convenient aliases) on your Model's attributes instead of the ones normally offered by ActiveRecord's hash parameters. It also adds convenient syntax for order clauses, smarter mapping of nested hash conditions, and a debug_sql method to see the real SQL your code is generating without running it against the database. If you like the new AR 3.0 query interface, you'll love it with MetaWhere. - forked and gemified for sayso
== 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.
SafeMemoize is a production-ready, zero-dependency memoization library for Ruby. It uses Ruby's prepend mechanism to wrap methods with a thread-safe cache (Mutex + double-check locking) that correctly handles nil and false return values — fixing the silent bug in the common ||= pattern. Results are cached per unique argument combination, so parameterized methods only compute each variant once. Additional features include TTL expiration, LRU cache size limiting, conditional caching via if:/unless: predicates, lifecycle hooks for hit/eviction/expiration events, per-instance metrics (hit rate, miss rate, computation time), targeted cache invalidation, custom cache key generators, and introspection helpers. Method visibility (public, protected, private) is fully preserved.