Skip to content

azer/pause-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pause-function

Pause and resume function calls

Install

$ npm install pause-function

Usage

pause = require('pause-function')
echo = pause(print)

echo('hello')
echo('world')

echo.resume()
// hello
// world

echo('span eggs')
// span eggs

function print (msg) {
  console.log(' => ', msg)
}

See test.js for more info

About

Pause and resume function calls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published