Results for “require”
Small, practical examples. Search by task or narrow things down below.
Read a repository-specific configuration value
Git: The local scope makes configuration lookup predictable for this practice repository.
Git✓ Tested
Read a scalar JSON property
Extract a named value using a JSON path.
JSON_VALUE✓ Tested
Read a secret from a mounted file
Docker / Compose: Compose secrets make a file available under /run/secrets.
Docker / Compose✓ Tested
Read a string’s character length
Bash Scripts: Bash parameter length counts characters under the current locale.
Bash Scripts✓ Tested
Read a tab-separated table
PowerShell: ConvertFrom-Csv accepts an explicit delimiter instead of requiring comma-separated input.
PowerShell✓ Tested
Read a text file
Open a UTF-8 text file and read its contents. A context manager closes the file automatically, even if reading fails.
file✓ Tested
Read a URL query parameter
Parse a URL with the standard JavaScript URL API.
JavaScript✓ Tested
Read a UTF-8 file
Read a small file as text using Node.js.
JavaScript✓ Tested
Read a value from a hashtable
PowerShell: Read a value from a hashtable using PowerShell 7.
PowerShell✓ Tested
Read a value from a trusted XML document
PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.
PowerShell✓ Tested
Read a variable whose name is stored in another variable
Bash Scripts: Indirect expansion performs one extra variable-name lookup.
Bash Scripts✓ Tested
Read a whole text file
Load text as one string instead of one item per line.
Get-Content✓ Tested