Skip to content

Commit b0ce0d6

Browse files
committed
Code style tweaks
1 parent 72f654b commit b0ce0d6

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,12 @@ function BinWrapper(opts) {
2020
}
2121

2222
this.opts = opts || {};
23-
this.opts.strip = this.opts.strip <= 0 ? 0 : !this.opts.strip ? 1 : this.opts.strip;
23+
24+
if (this.opts.strip <= 0 || !this.opts.strip) {
25+
this.opts.strip = 0;
26+
} else if (!this.opts.strip) {
27+
this.opts.strip = 1;
28+
}
2429
}
2530

2631
module.exports = BinWrapper;
@@ -157,7 +162,8 @@ BinWrapper.prototype.runCheck = function (cmd, cb) {
157162
}
158163

159164
if (this.version()) {
160-
return binVersionCheck()(this.path(), this.version(), cb);
165+
binVersionCheck()(this.path(), this.version(), cb);
166+
return;
161167
}
162168

163169
cb();

test/test.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ test('expose a constructor', function (t) {
1313
t.assert(typeof BinWrapper === 'function');
1414
});
1515

16-
test('return an instance if it called without `new`', function (t) {
17-
t.plan(1);
18-
t.assert(BinWrapper() instanceof BinWrapper);
19-
});
20-
2116
test('add a source', function (t) {
2217
t.plan(1);
2318

0 commit comments

Comments
 (0)