We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
util.inspect
Instead of using your own yamprint-ansi-color, there is already util.inspect.styles.
yamprint-ansi-color
util.inspect.styles
So, the easiest way to get colors is
import { inspect } from 'util' import { yamprint, YamprintTheme } from 'yamprint' import chalk from 'chalk' const yp = yamprint.extend({ formatter: Object.entries(inspect.styles).reduce((prev, [k, v]) => ({ ...prev, [k]: (chalk as any)[v] }), { lineInMultilineBlock: (chalk as any)[inspect.styles.string] } as YamprintTheme) })
But, I just couldn't avoid chalk as a dependency...
chalk
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Instead of using your own
yamprint-ansi-color
, there is alreadyutil.inspect.styles
.So, the easiest way to get colors is
But, I just couldn't avoid
chalk
as a dependency...The text was updated successfully, but these errors were encountered: