diff options
Diffstat (limited to 'deps/npm/lib/utils/move.js')
-rw-r--r-- | deps/npm/lib/utils/move.js | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/deps/npm/lib/utils/move.js b/deps/npm/lib/utils/move.js index 242e87d37f..d564962c21 100644 --- a/deps/npm/lib/utils/move.js +++ b/deps/npm/lib/utils/move.js @@ -1,19 +1,12 @@ 'use strict' module.exports = wrappedMove -var fs = require('graceful-fs') -var move = require('move-concurrently') -var Bluebird = require('bluebird') +const fs = require('graceful-fs') +const move = require('move-concurrently') +const Bluebird = require('bluebird') -function wrappedMove (from, to, cb) { - var movePromise = move(from, to, {fs: fs, Promise: Bluebird, maxConcurrency: 4}) - if (cb) { - return movePromise.then(function (value) { - cb(value) - }, function (err) { - cb(err) - }) - } else { - return movePromise - } +const options = {fs: fs, Promise: Bluebird, maxConcurrency: 4} + +function wrappedMove (from, to) { + return move(from, to, options) } |