mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
bug fix for _.memoize when key is derived from prototype
This commit is contained in:
@@ -52,6 +52,13 @@ $(document).ready(function() {
|
||||
var fastFib = _.memoize(fib);
|
||||
equals(fib(10), 55, 'a memoized version of fibonacci produces identical results');
|
||||
equals(fastFib(10), 55, 'a memoized version of fibonacci produces identical results');
|
||||
|
||||
var o = function(str) {
|
||||
return str;
|
||||
};
|
||||
var fastO = _.memoize(o);
|
||||
equals(o('toString'), 'toString', 'checks hasOwnProperty');
|
||||
equals(fastO('toString'), 'toString', 'checks hasOwnProperty');
|
||||
});
|
||||
|
||||
asyncTest("functions: delay", 2, function() {
|
||||
|
||||
Reference in New Issue
Block a user