npm.io
1.0.0 • Published 1 year ago

refcounter

Licence
Apache-2.0
Version
1.0.0
Deps
0
Size
13 kB
Vulns
0
Weekly
0
Stars
2

refcounter

Simple refcounter

npm install refcounter

Usage

const RefCounter = require('refcounter')

const refs = new RefCounter()

refs.inc()
refs.dec()

refs.isIdle() // true is no refs
await refs.idle() // wait for no refs

License

Apache-2.0