summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexander Early <alexander.early@gmail.com>2016-03-29 15:47:25 -0700
committerAlexander Early <alexander.early@gmail.com>2016-03-29 15:47:25 -0700
commit915f968c0965ea397f6b8c94e48fccd476b1747b (patch)
tree12974098734f116a8648bc8d65a6cffc6bfcb934 /lib
parent28fb768351192fb91743cd9cda9d015e08eac918 (diff)
downloadasync-915f968c0965ea397f6b8c94e48fccd476b1747b.tar.gz
use simple 'in' check rather than _.has in memoize
Diffstat (limited to 'lib')
-rw-r--r--lib/memoize.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/memoize.js b/lib/memoize.js
index 325f4f1..d1af636 100644
--- a/lib/memoize.js
+++ b/lib/memoize.js
@@ -2,11 +2,14 @@
import identity from 'lodash/identity';
import rest from 'lodash/rest';
-import has from 'lodash/has';
import setImmediate from './internal/setImmediate';
import initialParams from './internal/initialParams';
+function has(obj, key) {
+ return key in obj;
+}
+
export default function memoize(fn, hasher) {
var memo = Object.create(null);
var queues = Object.create(null);