Results for “require”
Small, practical examples. Search by task or narrow things down below.
Load service variables from an env file
Docker / Compose: env_file supplies runtime environment values.
Docker / Compose✓ Tested
Look up values in an associative array
Use named keys for a small in-memory configuration table.
dictionary✓ Tested
Loop over an array safely
Preserve spaces in array elements while iterating.
array✓ Tested
Make a Compose service’s filesystem read-only
Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.
Docker / Compose✓ Tested
Make a pair of columns unique together
SQL Server: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL Server✓ Tested
Make a pair of columns unique together
Postgres: A composite primary key permits repeated individual values while forbidding a duplicate combination.
Postgres✓ Tested
Make a pair of columns unique together
SQLite: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQLite✓ Tested
Map items to multiple output values
TypeScript: flatMap combines mapping and a one-level flattening operation.
TypeScript✓ Tested
Match a known text prefix
SQL Server: A percent wildcard matches zero or more characters following the prefix.
SQL Server✓ Tested
Match a known text prefix
Postgres: A percent wildcard matches zero or more characters following the prefix.
Postgres✓ Tested
Match a known text prefix
SQLite: A percent wildcard matches zero or more characters following the prefix.
SQLite✓ Tested
Match a text prefix
SQL Server: Use a percent wildcard after a known prefix.
SQL Server✓ Tested