FIND YOUR NEXT FEW LINES

Results for “as”

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

2533 snippets foundClear filters
JavaScriptRegular expressions & URL encoding

Validate a whole ASCII identifier

JavaScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.

JavaScript✓ Tested
TypeScriptRegular expressions & URL encoding

Validate a whole ASCII identifier

TypeScript: Use an anchored expression without the multiline flag and reject a trailing line break explicitly.

TypeScript✓ Tested
Docker / ComposeContainer lifecycle

Verify that a one-off container was removed

Docker / Compose: An automatically removed container no longer appears in an exact-name listing.

Docker / Compose✓ Tested
Bash ScriptsArray operations

Visit associative-array keys in a stable order

Bash Scripts: Associative arrays have no defined iteration order, so sort their keys explicitly.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Write and run a first Bash script

Bash Scripts: Write and run a first Bash script with a small standalone Bash program.

Bash Scripts✓ Tested
PowerShellHashtables & object records

Add a calculated property during selection

PowerShell: A calculated property can derive a value while retaining selected original properties.

PowerShell✓ Tested
JavaScriptUTC date operations

Add calendar days in UTC

JavaScript: Use UTC date setters to cross month boundaries without local daylight-saving effects.

JavaScript✓ Tested
Bash ScriptsArray operations

Append several items to an array

Bash Scripts: Array-plus-equals adds elements without losing spaces inside a quoted item.

Bash Scripts✓ Tested
TypeScriptUtilities & async

Await several independent results

Preserve input order while awaiting multiple promises.

Promise.all✓ Tested
JavaScriptRegular expressions & URL encoding

Build a URL query string from values

JavaScript: URLSearchParams handles query escaping and repeated parameter appends.

JavaScript✓ Tested
JavaScriptObject behavior & collections

Build an object from key-value entries

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

JavaScript✓ Tested
PowerShellFile operations & integrity

Calculate a file’s SHA-256 digest

PowerShell: Get-FileHash hashes bytes without requiring the caller to load the whole file.

PowerShell✓ Tested