Make copy() return event emitter

This way the storage logic does not need to rely on progress
This commit is contained in:
Girish Ramakrishnan
2017-10-04 11:00:30 -07:00
parent 38331e71e2
commit d70ff7cd5b
7 changed files with 49 additions and 30 deletions

View File

@@ -12,7 +12,6 @@ exports = module.exports = {
};
var assert = require('assert'),
config = require('./config.js'),
debug = require('debug')('box:progress');
// if progress.update or progress.backup are object, they will contain 'percent' and 'message' properties
@@ -42,8 +41,6 @@ function setDetail(tag, detail) {
assert.strictEqual(typeof tag, 'string');
assert.strictEqual(typeof detail, 'string');
if (config.TEST && !progress[tag]) progress[tag] = { };
progress[tag].detail = detail;
}