Results for “require”
Small, practical examples. Search by task or narrow things down below.
Give a result column a readable name
Postgres: Use AS to label a computed result column.
Postgres✓ Tested
Give a result column a readable name
SQLite: Use AS to label a computed result column.
SQLite✓ Tested
Give an existing image another tag
Docker / Compose: Tagging adds a reference without copying the image layers.
Docker / Compose✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Give implicit grid rows a minimum height
CSS: Minmax allows an implicit row to grow when its content requires more room.
CSS✓ Tested
Group by more than one field
SQL Server: Each distinct combination of grouping fields produces its own row.
SQL Server✓ Tested
Group by more than one field
Postgres: Each distinct combination of grouping fields produces its own row.
Postgres✓ Tested
Group by more than one field
SQLite: Each distinct combination of grouping fields produces its own row.
SQLite✓ Tested
Group records into map entries
TypeScript: Initialize an array for a missing Map key before appending its values.
TypeScript✓ Tested
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested
Handle a malformed JSON document
PowerShell: ConvertFrom-Json reports a terminating conversion error under the selected error preference.
PowerShell✓ Tested
Handle a nonzero background-job exit
Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.
Bash Scripts✓ Tested