Make chalk/assert shim a Proxy (#15234)
This commit is contained in:
1 parent
e22a5516f5
commit
f24132eda3
2 files changed
+3
-10
No files matched your search
@@ -1,4 +1,3 @@
|
||||
const assert = () => {};
|
||||
assert.ok = assert;
|
||||
assert.strictEqual = assert;
|
||||
const assert = new Proxy(() => {}, { get: () => assert });
|
||||
|
||||
export default assert;
|
||||
@@ -1,9 +1,3 @@
|
||||
const chalk = (x) => x;
|
||||
chalk.grey = chalk;
|
||||
chalk.red = chalk;
|
||||
chalk.bold = chalk;
|
||||
chalk.yellow = chalk;
|
||||
chalk.blue = chalk;
|
||||
chalk.default = chalk;
|
||||
const chalk = new Proxy(String, { get: () => chalk });
|
||||
|
||||
export default chalk;
|
||||
Reference in new issue
Block a user