Skip to content
Call callbacks a couple of times and return with the last data
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
ReadMe.md
example.js
leftover.js
package.json

ReadMe.md

leftover

Call callbacks a couple of times and return with the last data

Installation

npm install leftover

Example

var leftover = require('./leftover')

  , fn = leftover(3, function(err, data) {
      console.log(data) // will pring out "three"
    })

fn(null, 'one')
fn(null, 'two')
fn(null, 'three')
Something went wrong with that request. Please try again.