Results for “require”
Small, practical examples. Search by task or narrow things down below.
Detect an error inside a pipeline
Use pipefail to observe failure before the last pipeline command.
pipefail✓ Tested
Detect an invalid Date object
TypeScript: An invalid Date has a NaN time value.
TypeScript✓ Tested
Detect NaN without converting the input
TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
TypeScript✓ Tested
Disable a service’s network interfaces
Docker / Compose: network_mode none leaves only the loopback interface.
Docker / Compose✓ Tested
Disable networking for a Compose command
Docker / Compose: Disable networking for a Compose command in a small Compose file.
Docker / Compose✓ Tested
Disable networking for a local command
Docker / Compose: Disable networking for a local command using a locally available Ubuntu image.
Docker / Compose✓ Tested
Discard an unstaged edit to one tracked file
Git: Restore copies the index version back into the selected working file.
Git✓ Tested
Discard incidental output from a setup command
PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.
PowerShell✓ Tested
Dispatch a command with case
Choose an action from a small set of supported commands.
case✓ Tested
Dispatch values with wildcard patterns
PowerShell: Switch -Wildcard interprets shell-style matching patterns for each clause.
PowerShell✓ Tested
Display a fallback for missing data
SQL Server: Return a supplied label when a column contains NULL.
SQL Server✓ Tested
Display a fallback for missing data
Postgres: Return a supplied label when a column contains NULL.
Postgres✓ Tested