This is an alternative to https://github.com/jhurliman/node-rate-limiter/pull/92 that drops the just-performance dependency in favor of directly using performance (available in node global namespace since 16.x) and adds a create-package-json.js script that outputs package.json files with type commonjs/module into the dist/cjs and dist/esm output folders. The imports have been changed to use a .js extension to make this library compatible with node.js >=16.x, bundlers such as webpack, or directly in the browser using ESM.
This is an alternative to https://github.com/jhurliman/node-rate-limiter/pull/92 that drops the just-performance dependency in favor of directly using
performance
(available in node global namespace since 16.x) and adds a create-package-json.js script that outputs package.json files with type commonjs/module into the dist/cjs and dist/esm output folders. The imports have been changed to use a .js extension to make this library compatible with node.js >=16.x, bundlers such as webpack, or directly in the browser using ESM.Fixes #80, #93.