Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Pause and resume function calls
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
.npmignore
README.md
index.js
package.json
test.js

README.md

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

Something went wrong with that request. Please try again.