hasharray / revaluate.js

non destructive code revaluation
https://revaluate.js.org
2 stars 0 forks source link

Cache functions #8

Closed caspervonb closed 7 years ago

caspervonb commented 8 years ago

Program functions should be cached in the same way as call expressions are to maintain object identity.

e.g

module.exports = function() {
  console.log('beep');
};

This will work just fine, in most cases until a third party mutates the exported function as new revaluations will wipe the mutations.