Pear core ref counter
const ref = require('pear-ref')
ref.on('ref', (refs) => console.log('ref', 'count', refs))
ref.on('unref', (refs) => console.log('unref', 'count', refs))
ref.ref()
handleCreatingCb(function callback() {
ref.unref()
})
ref.track(handleCreatingPromise())Apache-2.0