Keep function prototype methods (#434)

This commit is contained in:
Richie Bendall 2021-04-20 18:48:30 +12:00 committed by GitHub
parent d798222a5a
commit 0fba91b037
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -54,6 +54,8 @@ function createChalk(options) {
return chalkFactory(options);
}
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
for (const [styleName, style] of Object.entries(ansiStyles)) {
styles[styleName] = {
get() {