Results for “cr”
Small, practical examples. Search by task or narrow things down below.
Inspect both successful and failed promise results
JavaScript: allSettled preserves input order and reports failures without rejecting the combined promise.
JavaScript✓ Tested
Inspect both successful and failed promise results
TypeScript: allSettled preserves input order and reports failures without rejecting the combined promise.
TypeScript✓ Tested
Inspect every command status in a pipeline
Bash Scripts: Copy PIPESTATUS immediately before another command overwrites it.
Bash Scripts✓ 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
Isolate variable changes in a subshell
Bash Scripts: Parentheses create a subshell whose variable assignments do not change the parent.
Bash Scripts✓ Tested
Iterate over object entries
Read JavaScript property names and values using Object.entries.
JavaScript✓ Tested
Iterate with array indices and values
JavaScript: entries provides each position and value without a separate counter.
JavaScript✓ Tested
Iterate with array indices and values
TypeScript: entries provides each position and value without a separate counter.
TypeScript✓ Tested
Join array items with a one-character separator
Bash Scripts: A local IFS controls the separator used by the quoted star expansion.
Bash Scripts✓ Tested
Keep a function variable local
Bash Scripts: Local prevents an ordinary function assignment from replacing a caller variable.
Bash Scripts✓ Tested
Keep a label available without occupying visible layout space
CSS: A clipped one-pixel label remains the input’s accessible name.
CSS✓ Tested