summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Brigante <github@bfred.it>2018-04-19 18:12:58 +0700
committerFederico Brigante <github@bfred.it>2018-04-19 18:33:23 +0700
commite3828896a165cb071da47f93bf6a82ae1ba730ab (patch)
tree9e35d6114b7a1763eb3b9bd4a01cbac6dfc5587a
parent6ad020d6222da759c127c416f599a29b01e722bc (diff)
downloadasync-e3828896a165cb071da47f93bf6a82ae1ba730ab.tar.gz
Drop constant
-rw-r--r--lib/retry.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/retry.js b/lib/retry.js
index b3212c6..390fd55 100644
--- a/lib/retry.js
+++ b/lib/retry.js
@@ -1,7 +1,12 @@
-import constant from 'lodash/constant';
import noop from './internal/noop';
import wrapAsync from './internal/wrapAsync';
+function constant(value) {
+ return function () {
+ return value;
+ }
+}
+
/**
* Attempts to get a successful response from `task` no more than `times` times
* before returning an error. If the task is successful, the `callback` will be