Skip to main content

formatWithOptions

function formatWithOptions
Jump to headingformatWithOptions(
inspectOptions: InspectOptions,
format?: any,
...param: any[],
): string

This function is identical to format, except in that it takes an inspectOptions argument which specifies options that are passed along to 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.

Parameters Jump to heading

optional
Jump to headingformat: any
Jump to heading<span>...param</span>: any[]

Return Type Jump to heading

string
Back to top