Skip to content

dashkite/river

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DashKite River

Iterator and reactor functions for JavaScript

Hippocratic License HL3-CORE

River provides a unified functional interface for iterators and reactors (asynchronous iterators). Every function is curried and automatically dispatches to the most efficient implementation based on the input type.

Use

import { pipe } from "@dashkite/joy/function"
import {
  collect
  map
  resolve
} from "@dashkite/river"

json = ( response ) -> response.json()

get = pipe [
  map fetch
  resolve
  map json
  resolve
  collect
]

values = await get [ "https://httpbin.org/json" ]

Features

  • Uses lazy evaluation whenever possible
  • Dispatches to the optimized implementation based on the arguments
  • Provides a functional interface for a superset of the JavaScript iterator helpers
  • Preserves this binding within combinators allowing use within methods

API Reference

API Reference

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published