Skip to main content
InspectOptions.sorted - node__util.d.ts - Node documentation
property InspectOptions.sorted

Usage in Deno

```typescript import { type InspectOptions } from "node:node__util.d.ts"; ```
If set to `true` or a function, all properties of an object, and `Set` and `Map` entries are sorted in the resulting string. If set to `true` the default sort is used. If set to a function, it is used as a compare function.

Type

boolean
| ((
a: string,
b: string,
) => number)

| undefined