Skip to content

Repository files navigation

once

Make a function or method callable only once. Useful for initialization methods that may be lazily invoked from several locations, but must only be called once, otherwise the method is a noop.

Installation

$ component install component/once

API

varonce=require('once');Foo.prototype.setup=once(function(){// expensive stuff here});

License

MIT

About

Make a method callable only once

Resources

Stars

6 stars

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages