Skip to content

Commit

Permalink
Updated the writable stream check
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluebberies committed Oct 24, 2024
1 parent ba518b7 commit 66d3279
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class Ora {
};
}

if (options?.stream && typeof options.stream.write !== 'function') {
throw new TypeError('Stream must be a writable stream');
}

this.#options = {
color: 'cyan',
stream: process.stderr,
Expand Down

0 comments on commit 66d3279

Please sign in to comment.