Results for “properties”
Small, practical examples. Search by task or narrow things down below.
Build an object from key-value entries
JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.
JavaScript✓ Tested
Build an object from key-value entries
TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.
TypeScript✓ Tested
Create a modified copy of an immutable record
C#: A with expression creates a shallow copy with selected changed properties.
C#✓ Tested
Extract filename components
Python: Use pathlib properties to separate a directory, filename stem, and suffix.
Python✓ Tested
Handle a result with a discriminated union
Separate success data from an error message.
discriminated union✓ Tested
Inspect a parsed URI
C#: Use Uri properties instead of splitting URL strings manually.
C#✓ Tested
Inspect the parsed pieces of a URL
JavaScript: Use URL properties rather than splitting a URL at punctuation.
JavaScript✓ Tested
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
List an object’s own enumerable keys
JavaScript: Object.keys omits inherited and non-enumerable properties.
JavaScript✓ Tested
List an object’s own enumerable keys
TypeScript: Object.keys omits inherited and non-enumerable properties.
TypeScript✓ Tested
Parse JSON into an object
Access a named field in a JSON document.
JSON✓ Tested
Read a value from a trusted XML document
PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.
PowerShell✓ Tested