Skip to content

Commit

Permalink
🧪 include examples in the playground for the new features
Browse files Browse the repository at this point in the history
  • Loading branch information
astoilkov committed May 10, 2024
1 parent b31bb92 commit f51c2ae
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions playground/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ inspect(
// Set
inspect(new Set(["🥑 avocado", "🍌 banana", "🍍 pineapple", "🍓 strawberry"]));

// options.keys
consoleInspect(
[
{
Expand All @@ -271,3 +272,23 @@ consoleInspect(
keys: ["price", "year", "amount"],
},
);

// Error (inspect)
consoleInspect(new Error("Hello world!"));

// long object keys
consoleInspect(
{
longLongVeryLongObjectKeyThatWrapsIfWeDontDoAnythingLongLongVeryLongObjectKeyThatWrapsIfWeDontDoAnythingLongLongVeryLongObjectKeyThatWrapsIfWeDontDoAnything:
true,
shortKey: false,
},
{ wrap: "multi-line" },
);

// array with object keys/properties
const array = [1, 2, 3];
(array as any).someObjectKey = "someObjectValue";
consoleInspect(array);
(array as any).innerObj = { a: 1 };
consoleInspect(array);

0 comments on commit f51c2ae

Please sign in to comment.