Utilities for JavaScript Iterable and AsyncIterable
Get the first fulfilled promise that satisfies the provided testing function
A tiny, zero-dependency yet spec-compliant asynchronous iterator polyfill/ponyfill for ReadableStreams.
[](http://www.typescriptlang.org/) [](https://www.npmjs.com/package/@n1ru4l/push-pull-async
Iterable wrapper that add methods to read ahead or behind current item.
Extended iterable class, providing lazy array-like methods with automatic async and return/throw forwarding
Array.prototype.map analog for iterables.
Convert a string/promise/array/iterable/asynciterable/buffer/typedarray/arraybuffer/object into a stream
Checks if a given object is iterable
ndjson to async iterator
Iterables which cache the values they yield
An iterable transform that spread each iterable received and emit its items
Deques are a generalization of stacks and queues
JS library for Fengari
An iterable transform that apply replace to all items
Iterable SDK for React Native.
The Interactive Extensions for JavaScript
Array manipulation, ordering, searching, summarizing, etc.
Iterate any iterable JS value. Works robustly in all environments, all versions.
A tiny but capable push & pull stream library for TypeScript and Flow
Split an iterable into evenly sized chunks
Convert streaming iterables to Node.js streams
Config plugin for @iterable/react-native-sdk
Set of classes used for async prefetching with backpressure (IterableMapper) and async flushing with backpressure (IterableQueueMapper, IterableQueueMapperSimple)
Look ahead when iterating over an enumerable collection
Extract, Transform, and Load (ETL) ruby wrapper
Useful extensions to Enumerable and String, Range and other classes. A Enumerable#each_with_flags for flagging first and last items in the iteration, operations on Ranges for testing contiguity, gaps in sets of Ranges, and performing set operations on Ranges. String#fuzzy_match for user-friendly matchers to test for matching.
A Sinatra extension for setting and showing Rails-like flash messages. This extension improves on the Rack::Flash gem by being simpler to use, providing a full range of hash operations (including iterating through various flash keys, testing the size of the hash, etc.), and offering a 'styled_flash' view helper to render the entire flash hash with sensible CSS classes. The downside is reduced flexibility -- these methods will *only* work in Sinatra.
Provides the class IterableArray, which implements all of the methods of Array (as of Ruby 1.9.3) in an iterable-aware fashion. I.e., behavior is defined to the greatest extent possible for operations that modify an IterableArray from within an iteration block (e.g. each, map, delete_if, reverse_each). To use, call #to_iter on a pre-existing Array or use IterableArray.new; the IterableArray should act identically to a regular Array except that it responds logically to modifications during iteration.
Sequence provides a unified api for access to sequential data types, like Strings, Arrays, Files, IOs, and Enumerations. This is the external iterator pattern (ruby's usual iterators are internal). Each sequence encapsulates some data and a current position within it. Some operations apply to data at (or relative to) the position, others are independant of position. The api contains operations for moving the position, and reading and writing data (with or without moving the position) forward or backward from the current position or anywhere. Its perhaps most unusual feature is the ability to scan for Regexps in not just Strings, but Files and any other type of sequence.
Iterate quickly from an irb/pry session. Use your own code to run Elasticsearch queries and pretty print the full profile or only the slow operations. Or when setting up Kibana is too troublesome.
A Sinatra extension for setting and showing Rails-like flash messages. This extension improves on the Rack::Flash gem by being simpler to use, providing a full range of hash operations (including iterating through various flash keys, testing the size of the hash, etc.), and offering a 'styled_flash' view helper to render the entire flash hash with sensible CSS classes. The downside is reduced flexibility -- these methods will *only* work in Sinatra.
Langda monitors Ruby loop operations (each, map, select, etc.), counts their iterations, measures execution time, and logs slow loops. It helps developers quickly identify performance bottlenecks in real application code with zero configuration and no breaking changes.
== 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.
A quick and easy benchmarking library for Ruby. Useful for benchmarking only part of an iteration, and accumulating the data to report later in the code.
Crowdfund is a Ruby program developed based on Pragmatic Studio's Ruby Programming hands-on video course, and distributed as a Ruby gem. This program has been developed using all the strengths of Ruby including the following. Ruby Programming Environment * Installing Ruby on your favorite operating system (free exercise) * Running Ruby using the interactive Ruby shell (irb) and writing Ruby program files * Using Ruby's documentation system to get help * Installing external Ruby libraries using RubyGems * Troubleshooting common problems Ruby Language Constructs * Expressions and variables * Numbers, string, and symbols (free video & exercise) * Loops and conditional expressions * Arrays and hashes (free video & exercise on hashes) * Classes, modules, and structs Object-Oriented Programming * Using built-in Ruby classes * Defining your own classes with state and behavior (free video & exercise) * Creating unique objects * Telling objects what to do by calling methods * Modeling class-level inheritance relationships * Sharing code with mixins Object-Oriented Design Principles * Encapsulation * Separation of concerns * Polymorphism * Don't Repeat Yourself * Tell, Don't Ask Blocks and Iterators * Calling built-in methods that take blocks * Writing your own methods that yield to blocks * Implementing custom iterators * Effectively using blocks in your programs Organizing Ruby Code * Creating a Ruby project structure * Separating source files for easier reuse and testing * Namespacing to avoid naming clashes * Input/Output * Reading data from files * Writing data to files * Creating an interactive console prompt * Handling command-line input Unit Testing * Writing and running unit tests with RSpec * Test-driven development and the red-green-refactor cycle * Stubbing methods to control tests * Refactoring code, safely! Distribution * Conforming to RubyGems conventions * Writing a GemSpec * Building a RubyGem * Publishing a RubyGem to a public server Ruby Programming Idioms