Closed aminya closed 1 week ago
@aminya great thanks for the effort, but at this point I do not plan to refactor this package into ES modules.
I believe this package is also perfectly accessible from ES modules context.
Ideally such changes, before taking implementation effort should be first consulted on issue level
No problem. I assumed that this repo will not be open to modernization given the number of polyfills that are imported directly. I'll create a hard fork then.
Here's the fork link for those interested. I'll probably rename and publish the modernized package on npm soon. It will be API-compatible with memoizee, and will support all the old platforms via Babel. https://github.com/aminya/memoizee/
This adds support for EsModules to Memoizee. This is a step towards the modernization of this library. The old Node 0.12 support is maintained via Babel, and thus these changes are fully backwards compatible.
When ' ESM ' is used, the main
memoizee
function loads the extensions asynchronously via dynamic imports. This helps prevent the bundling of unused code in the browsers.31st Aug 2024 benchmarks: