Skip to content

Instantly share code, notes, and snippets.

@codyzu
Created September 6, 2019 09:29
Show Gist options
  • Save codyzu/9fe32e7cc475509f419845eb716116ed to your computer and use it in GitHub Desktop.
Save codyzu/9fe32e7cc475509f419845eb716116ed to your computer and use it in GitHub Desktop.
// Create a private instance of lodash
// since we will modify the memoize cache config
const {memoize} = require('lodash').runInContext();
// Set the memoize cache to use WeakMap
memoize.Cache = WeakMap;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment