UNPKG
refcounter
Version:
latest (1.0.0)
1.0.0
0.0.0
Simple refcounter
github.com/holepunchto/refcounter
holepunchto/refcounter
refcounter
/
README.md
26 lines
(16 loc)
•
277 B
Markdown
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# refcounter
Simple refcounter ``` npm install refcounter ```
## Usage
``` js
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