diff options
author | Alex Early <alexander.early@gmail.com> | 2018-07-08 16:58:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-08 16:58:36 -0700 |
commit | e4751178540a3c6e64598b93977481ec599704d2 (patch) | |
tree | dce5731bdb1076971d2e4a0a42fbe0d95c720185 /lib/internal/setImmediate.js | |
parent | 6405b109fe60541ff42d7638ac891d321d6a7bb3 (diff) | |
download | async-e4751178540a3c6e64598b93977481ec599704d2.tar.gz |
ES6-ify codebase (#1553)
* cancelable foreach
* cancelable waterfall
* cancellable auto
* fix lint
* fix tests
* cancelable whilst/until/during/forever
* fix waterfall test. It WILL get there
* docs
* use rest params instead of slice
* clean up internals
* remove property func
* clarify uses of createTester
* happy path async funtions in asyncify
* stop using arguments
* DLL to class
* moar arrows
* fix merge issues
* remove forOwn
* moar arrows
* fix merge mistake
* even more arrows, what can stop him
* mo more fn.apply(null,...)
* remove more spurious uses of apply
* update lint config
* just when you thought there couldn't possibly be more arrows
* use eslint:recommended
* even less uses or aguments
* get rid of prototype cuteness
* fix concat tests
* fix more tests
Diffstat (limited to 'lib/internal/setImmediate.js')
-rw-r--r-- | lib/internal/setImmediate.js | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/internal/setImmediate.js b/lib/internal/setImmediate.js index 95191f9..e14e52e 100644 --- a/lib/internal/setImmediate.js +++ b/lib/internal/setImmediate.js @@ -1,7 +1,5 @@ 'use strict'; -import slice from './slice'; - export var hasSetImmediate = typeof setImmediate === 'function' && setImmediate; export var hasNextTick = typeof process === 'object' && typeof process.nextTick === 'function'; @@ -10,12 +8,7 @@ export function fallback(fn) { } export function wrap(defer) { - return function (fn/*, ...args*/) { - var args = slice(arguments, 1); - defer(function () { - fn.apply(null, args); - }); - }; + return (fn, ...args) => defer(() => fn(...args)); } var _defer; |