@azerum/ts-csp
    Preparing search index...

    @azerum/ts-csp

    CSP-style channels for TypeScript with async/await. Inspired by:

    • Communicating Sequential Processes
    • Go channels
    • Clojure's core.async
    • @thi.ng/csp - idea of return types of read() and tryRead() that avoid extra allocations
    npm install @azerum/ts-csp
    
    • Write familiar procedural code with async/await to process streams of data, while respecting backpressure. No more callback hell

    • Buffered & unbuffered channels

    • select() function similar to select{} statement in Go, alts! in Clojure (currently, only reads are supported)

    • Cancellation of reads using AbortSignal, see select()

    • Some useful operators: merge(), partitionTime(), timeout()

    • Focus on TS ergonomics: strict types, inferred nicely when possible (e.g. see return type of select())

    • Works in Node.js and browsers; relies on global setTimeout, AbortController

    • No dependencies

    • Thoroughly tested

    API docs describe what each method on Channel does and more

    See src/_examples directory: