formatWithOptions

external fun formatWithOptions(inspectOptions: InspectOptions, format: Any? = definedExternally, vararg param: Any?): String(source)

This function is identical to {@link format}, except in that it takes an inspectOptions argument which specifies options that are passed along to {@link inspect}.

util.formatWithOptions({ colors: true }, 'See object %O', { foo: 42 });
// Returns 'See object { foo: 42 }', where `42` is colored as a number
// when printed to a terminal.

Since

v10.0.0