first commit
This commit is contained in:
11
node_modules/motion-utils/dist/es/memo.mjs
generated
vendored
Normal file
11
node_modules/motion-utils/dist/es/memo.mjs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*#__NO_SIDE_EFFECTS__*/
|
||||
function memo(callback) {
|
||||
let result;
|
||||
return () => {
|
||||
if (result === undefined)
|
||||
result = callback();
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
export { memo };
|
||||
Reference in New Issue
Block a user