don't use prototype to export module members
This commit is contained in:
parent
cc4e4c429f
commit
95783b24e0
1 changed files with 4 additions and 5 deletions
9
index.js
9
index.js
|
|
@ -97,9 +97,8 @@ function init() {
|
|||
|
||||
defineProps(Chalk.prototype, init());
|
||||
|
||||
Chalk.prototype.styles = ansiStyles;
|
||||
Chalk.prototype.hasColor = hasAnsi;
|
||||
Chalk.prototype.stripColor = stripAnsi;
|
||||
Chalk.prototype.supportsColor = supportsColor;
|
||||
|
||||
module.exports = new Chalk();
|
||||
module.exports.styles = ansiStyles;
|
||||
module.exports.hasColor = hasAnsi;
|
||||
module.exports.stripColor = stripAnsi;
|
||||
module.exports.supportsColor = supportsColor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue