javascript-allonge-six
javascript-allonge-six copied to clipboard
Recipes w/ Objects: Memoize Code
The memoized code recipe at the bottom of page 216 (pdf version, 4/14/16) fails when combined with subsequent code samples.
I believe that the following line is the culprit:
const key = JSON.stringify(this, args);
I got it working with:
const key = JSON.stringify.apply(this, args);