value-inspector
Eval and stringify
{ primitiveNull: null, valueNaN: NaN, valueInfinity: Infinity, valueGlobalThis: globalThis, valueUndefined: undefined, booleanTrue: true, booleanFalse: false, textString: "a string", textRegExp: new RegExp("$ 🐈"), numberZero: 0, numberOne: 1, obj: { zero: 0, one: { two: 2, three: { four: 4 } }, }, objInline: { zero: 0, one: 1, }, fun() {}, functionArrow: () => {}, functionGenerator: function* () {}.constructor, array: [0, 1], arrayLong: Array.from({ length: 10 }, (_, i) => i), arrayTwoD: Array.from({ length: 10 }, (_, i) => [i * 3, i * 3 + 1, i * 3 + 2]), arrayTyped: Float32Array.of(0, 1), arrayBuffer: new ArrayBuffer(8), // arrayBufferShared: new SharedArrayBuffer(8), arrayDataView: new DataView(new ArrayBuffer(8)), error: new TypeError("Huhoh"), date: new Date(), bigInt: BigInt(0x1fffffffffffff), collectionMap: new Map([ [0, "zero"], [1, "one"], ]), collectionSet: new Set([0, 1]), collectionWeakMap: new WeakMap(), collectionWeakSet: new WeakSet(), symbol: Symbol("foo"), [Symbol("bar")]: "symbol-bar-value", promise: Promise.resolve(), proxy: new Proxy({ zero: 0 }, {}), }