mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
fix(node/util): export styleText
from node:util
(#26194)
Fixes #26184. It was added but not publicly exported.
This commit is contained in:
parent
7a990d9d42
commit
4f89225f76
2 changed files with 8 additions and 0 deletions
|
@ -39,6 +39,7 @@ import {
|
|||
formatWithOptions,
|
||||
inspect,
|
||||
stripVTControlCharacters,
|
||||
styleText,
|
||||
} from "ext:deno_node/internal/util/inspect.mjs";
|
||||
import { codes } from "ext:deno_node/internal/error_codes.ts";
|
||||
import types from "node:util/types";
|
||||
|
@ -63,6 +64,7 @@ export {
|
|||
parseArgs,
|
||||
promisify,
|
||||
stripVTControlCharacters,
|
||||
styleText,
|
||||
types,
|
||||
};
|
||||
|
||||
|
@ -354,4 +356,5 @@ export default {
|
|||
debuglog,
|
||||
debug: debuglog,
|
||||
isDeepStrictEqual,
|
||||
styleText,
|
||||
};
|
||||
|
|
|
@ -348,3 +348,8 @@ Deno.test("[util] aborted()", async () => {
|
|||
await promise;
|
||||
assertEquals(done, true);
|
||||
});
|
||||
|
||||
Deno.test("[util] styleText()", () => {
|
||||
const redText = util.styleText("red", "error");
|
||||
assertEquals(redText, "\x1B[31merror\x1B[39m");
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue