FIND YOUR NEXT FEW LINES

Results for “properties”

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

25 snippets foundClear filters
JavaScriptObject behavior & collections

Build an object from key-value entries

JavaScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

Build an object from key-value entries

TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

TypeScript✓ Tested
C#Types & reliable control flow

Create a modified copy of an immutable record

C#: A with expression creates a shallow copy with selected changed properties.

C#✓ Tested
PythonFile operations & archives

Extract filename components

Python: Use pathlib properties to separate a directory, filename stem, and suffix.

Python✓ Tested
TypeScriptSafe data handling

Handle a result with a discriminated union

Separate success data from an error message.

discriminated union✓ Tested
C#Asynchronous work & URI handling

Inspect a parsed URI

C#: Use Uri properties instead of splitting URL strings manually.

C#✓ Tested
JavaScriptRegular expressions & URL encoding

Inspect the parsed pieces of a URL

JavaScript: Use URL properties rather than splitting a URL at punctuation.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Inspect the parsed pieces of a URL

TypeScript: Use URL properties rather than splitting a URL at punctuation.

TypeScript✓ Tested
JavaScriptObject behavior & collections

List an object’s own enumerable keys

JavaScript: Object.keys omits inherited and non-enumerable properties.

JavaScript✓ Tested
TypeScriptObject behavior & collections

List an object’s own enumerable keys

TypeScript: Object.keys omits inherited and non-enumerable properties.

TypeScript✓ Tested
PowerShellText & data

Parse JSON into an object

Access a named field in a JSON document.

JSON✓ Tested
PowerShellStructured formats & encodings

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