Last active
April 20, 2018 14:07
-
-
Save littlemooon/50eec2176f3304486e4047386c1de868 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import memoize from 'memoizee' | |
export default function makeCallback() { | |
return memoize( | |
function(func, args) { | |
return function(additionalArgs) { | |
return func(...args, ...additionalArgs) | |
} | |
}, | |
{ length: false } | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment