Skip to content

timmarinin/once-cb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

once-cb

Barebone once-and-only-once callback transformer.

Usage

var once = require('once-cb')

var cb = once(function() {
    console.log('callback!)
})

cb() // console.log appears
cb() // nothing happens

For details, look at the tests.

License

Written by Marinin Tim (@marinintim), licensed under MIT license.

About

wrapper for calling callback only once

Resources

Stars

Watchers

Forks

Packages

No packages published