Skip to content

10xly/call.next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

call.next

A robust, enterprise-grade utility to safely invoke .next on generators.

Installation

npm install node-call.next

Usage

const call = require("node-call.next")

function* myGeneratorFunction() {
  yield "hello world"
}

const generator = myGeneratorFunction()

console.log(call.next(generator)) // { value: 'hello world', done: false }