An iterator wrapper that supports Rust-style chaining

Overview

Riter (in development)

An iterator wrapper that supports Rust-style chaining

Install

TODO: This package is not yet available. Once it's mature enough, you should be able to install it with npm i --save riter.

Example

TODO: actually implement them

// select all <td>s at odd indices whose textContent is 'foo', and append 'bar' to each of them
// only for demonstration: you should use :nth-child(odd) selector instead
new Riter(document.querySelectorAll('td'))
	.enumerate()
	.filter([i, td] => i % 2 == 1 && td.textContent == 'foo')
	.forEach([, td] => td.textContent += 'bar');

// collect elements of an async iterator into an array
[...await new AsyncRiter(asyncIterable).toSync()]

Usage

new Riter(iterable)

new AsyncRiter(asyncIterable)

Note to self

You might also like...

Rust's OptionT and ResultT, E, implemented for TypeScript.

oxide.ts Rust's OptionT and ResultT, E, implemented for TypeScript. Features Zero dependencies, full test coverage and examples for every function

Jan 3, 2023

A TOML parsing tool written in Rust for Node.js

@daydog/toml A TOML parsing tool written in Rust for Node.js Installation @daydog/toml is available via npm. npm install @daydog/toml Usage parse You

Jul 20, 2022

Drawing Newton's fractal using pure js, rust-wasm, SIMDs, threads and GPU

Drawing Newton's fractal using pure js, rust-wasm, SIMDs, threads and GPU

Newton's fractal Runtime Newton's fractal renderer. Click to open in your browser Inspired by 3blue1brown's video about Newton's fractal. Drawing

Nov 17, 2022

A simple Rust DApp Calculator in Solana 🦀

Rust Calculator 🖩 in Solana 🦀 This Calculator written Rust using Anchor ⚓ Setting up the Environment: Rust Installation: curl --proto '=https' --tls

Oct 11, 2022

Remix sandbox repo for Rust compiled to WASM and to native N-API modules

Rust - Remix Sandbox Now with both native Rust and WASM versions! If you want to combine the Web Fundamentals & Modern UX of Remix together with the

Dec 30, 2022

A low-feature, dependency-free and performant test runner inspired by Rust and Deno

minitest A low-feature, dependency-free and performant test runner inspired by Rust and Deno Simplicity: Use the mt test runner with the test function

Nov 12, 2022

Template for generating rust-based native projects

Speedy NAPI-RS template Use this template Click use this template above, then find and replace speedy-sourcemap to your desired naming. Setup Rust too

Jan 21, 2022

A Remix stack setup to run on Deno with support for Rust WASM modules!

Remix + Deno + Rust - Webassembly - The Air Metal Stack Welcome to the Air Metal Stack for Remix! 🦕 + 🦀 This stack is a good choice if you want to

Jan 5, 2023

A planetary body simulator with a HTML5/CSS3/JS frontend and simulated using Rust WebAssembly.

A planetary body simulator with a HTML5/CSS3/JS frontend and simulated using Rust WebAssembly.

Solar Sim 🪐 A planetary body simulator with a HTML5/CSS3/JS frontend and simulated using Rust WebAssembly. Try the latest version here! Built with 🦀

Jun 15, 2022
Owner
잇창명
잇창명
Utility functions for iterators. Inspired by Rust's `std::iter::Iterator` trait.

iter-funcs About Utility functions for iterators. Inspired by Rust's std::iter::Iterator trait. This library uses JavaScript native iterators, so it's

Shuntaro Nishizawa 6 Dec 27, 2022
Node.js ESM loader for chaining multiple custom loaders.

ESMultiloader Node.js ESM loader for chaining multiple custom loaders. Fast and lightweight No configuration required, but configurable if needed Usag

jhmaster2000 2 Sep 12, 2022
Ergonomic, chaining-based Typescript framework for quick API development for Fastify

Ergonomic, chaining-based Typescript framework for quick API development for Fastify Installation > pnpm add @t3ned/channel Usage // index.ts import

T3NED 6 Aug 2, 2022
Base62-token.js - Generate & Verify GitHub-style & npm-style Base62 Tokens

base62-token.js Generate & Verify GitHub-style & npm-style Secure Base62 Tokens Works in Vanilla JS (Browsers), Node.js, and Webpack. Online Demo See

Root 4 Jun 11, 2022
Full-stack-todo-rust-course - we are building this out now in prep for the real course

full-stack-todo-rust-course wip - we are building this out now in prep for the real course Plan Come up with the requirements Create user stories Desi

Brooks Builds 89 Jan 2, 2023
A Rust rewrite of Flameboi that will be more approachable for new developers to contribute to.

Devil Bot Rust Overview A Rust implementation of a Slack bot that will be used by the CodeDevils Slack workspace. All resources are managed using AWS

CodeDevils 11 Dec 21, 2022
A Minecraft launcher written in Rust, with an Electron frontend.

RustMine A Minecraft launcher written in Rust, with an Electron frontend. Why? I thought it would be fun to use two of my most familiar languages, Rus

sussyimpostor 1 Oct 16, 2022
An Electron app using NAPI-RS and a native Rust module to implement a Svelte store.

Svelte Store Written in Rust This repo shows a demo of an Electron app running a Svelte UI that reads and writes a Svelte store, but with a twist: the

Dave Ceddia 27 Sep 20, 2022
Quick One Liners in JavaScript, TypeScript, Python, Rust, Java, Ruby, C, C++

ONE LINERS This repository contains cool and simple one line utility functions to easily use common repetitive methods in JavaScript, TypeScript, Pyth

Divin Irakiza 3 Mar 2, 2022
Gutenberg + Rust + TypeScript

Gutenberg + Rust + TypeScript This is a minimum block plugin template to rapidly get started building WP blocks using Rust + TypeScript. Follow me on

Kevin Batdorf 29 Dec 23, 2022