Skip to content

Commit

Permalink
Remove deprecated argument
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 17, 2018
1 parent b666e1f commit ab3d77f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions index.js
Expand Up @@ -146,18 +146,11 @@ class Ora {
return this.stopAndPersist({symbol: logSymbols.info, text});
}

stopAndPersist(options) {
stopAndPersist(options = {}) {
if (!this.enabled) {
return this;
}

// TODO: Remove in the next major version
if (typeof options === 'string') {
throw new TypeError('This argument now accepts an options object, not a string');
}

options = options || {};

this.stop();
this.stream.write(`${options.symbol || ' '} ${options.text || this.text}\n`);

Expand Down

0 comments on commit ab3d77f

Please sign in to comment.