Results for “require”
Small, practical examples. Search by task or narrow things down below.
Inspect the parsed pieces of a URL
TypeScript: Use URL properties rather than splitting a URL at punctuation.
TypeScript✓ Tested
Inspect which files a stash changes
Git: stash show can report just filenames before applying anything.
Git✓ 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
TypeScript: entries provides each position and value without a separate counter.
TypeScript✓ Tested
Join a parent to pre-aggregated totals
SQL Server: Aggregate the child rows first to produce at most one joined row per parent.
SQL Server✓ Tested
Join a parent to pre-aggregated totals
Postgres: Aggregate the child rows first to produce at most one joined row per parent.
Postgres✓ Tested
Join a parent to pre-aggregated totals
SQLite: Aggregate the child rows first to produce at most one joined row per parent.
SQLite✓ Tested
Join an array into text
PowerShell: Join an array into text using PowerShell 7.
PowerShell✓ 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
Join related rows from two tables
SQL Server: Match a category key to its display label with an explicit join condition.
SQL Server✓ Tested
Join related rows from two tables
Postgres: Match a category key to its display label with an explicit join condition.
Postgres✓ Tested