diff options
author | Federico Brigante <github@bfred.it> | 2018-04-19 18:12:58 +0700 |
---|---|---|
committer | Federico Brigante <github@bfred.it> | 2018-04-19 18:33:23 +0700 |
commit | e3828896a165cb071da47f93bf6a82ae1ba730ab (patch) | |
tree | 9e35d6114b7a1763eb3b9bd4a01cbac6dfc5587a | |
parent | 6ad020d6222da759c127c416f599a29b01e722bc (diff) | |
download | async-e3828896a165cb071da47f93bf6a82ae1ba730ab.tar.gz |
Drop constant
-rw-r--r-- | lib/retry.js | 7 |
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 |