diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-09-16 23:21:05 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-09-16 23:21:28 +0100 |
| commit | 5488058d7ca995fcaaf642dcbe31dbc0255fe4be (patch) | |
| tree | 0f361b2a274e979d54208dc16c33dbdc06fbec58 /lib/promises.js | |
| parent | 957cc76b3f841765f6c1ae3eeaafe912100a7ee0 (diff) | |
Rename promises.attempt() to try()
Diffstat (limited to 'lib/promises.js')
| -rw-r--r-- | lib/promises.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/promises.js b/lib/promises.js index b318316..0b32e71 100644 --- a/lib/promises.js +++ b/lib/promises.js @@ -8,7 +8,7 @@ exports.props = bluebird.props; exports.reject = bluebird.reject; exports.mapSeries = bluebird.mapSeries; -exports.attempt = function(func) { +exports.try = function(func) { try { return bluebird.resolve(func()); } catch (error) { |
