Separated publisher/subscriber for NPM package