复杂的自定义着色


¥Complex custom coloring

可以将方法定义为样式。它接收输入的字符串化值。当着色功能处于活动状态且类型已检查时,将调用该方法。

¥It is possible to define a method as style. It receives the stringified value of the input. It is invoked in case coloring is active and the type is inspected.

示例:util.inspect.styles.regexp(value)

¥Example: util.inspect.styles.regexp(value)

  • value <string> 输入类型的字符串表示形式。

    ¥value <string> The string representation of the input type.

  • 返回:<string> object 的调整后表示形式。

    ¥Returns: <string> The adjusted representation of object.