FIND YOUR NEXT FEW LINES

Results for “object”

Small, practical examples. Search by task or narrow things down below.

96 snippets foundClear filters
TypeScriptObject behavior & collections

Find members absent from another set

TypeScript: Negate a membership test to calculate the set difference.

TypeScript✓ Tested
JavaScriptObject behavior & collections

Find shared members of two sets

JavaScript: Filter one set through the other set’s membership test.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Find shared members of two sets

TypeScript: Filter one set through the other set’s membership test.

TypeScript✓ Tested
CSSVisual treatment & accessibility

Fit an entire image inside a differently shaped box

CSS: Contain preserves the image aspect ratio while keeping all of it visible inside the specified content box.

CSS✓ Tested
JavaScriptObject behavior & collections

Group records into map entries

JavaScript: Initialize an array for a missing Map key before appending its values.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
PowerShellHashtables & object records

Merge configuration maps with override precedence

PowerShell: Copy defaults before applying override keys so the original remains unchanged.

PowerShell✓ Tested
PowerShellHashtables & object records

Preserve key insertion order

PowerShell: An ordered dictionary enumerates keys in the order they were inserted.

PowerShell✓ Tested
JavaScriptObject behavior & collections

Prevent runtime changes to top-level properties

JavaScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Prevent runtime changes to top-level properties

TypeScript: Object.freeze prevents ordinary top-level mutations; Reflect.set reports the rejected update without throwing.

TypeScript✓ Tested
TypeScriptSafe data handling

Read a nested optional value

Avoid dereferencing a missing nested object.

optional chaining✓ Tested
JavaScriptObject behavior & collections

Remove a Map entry and detect whether it existed

JavaScript: Map.delete returns true only when an entry was present.

JavaScript✓ Tested