Results for “is”
Small, practical examples. Search by task or narrow things down below.
Check whether every item matches
JavaScript: every stops at the first failed predicate and returns true for an empty array.
JavaScript✓ Tested
Check whether text ends with a suffix
JavaScript: Use endsWith for a literal case-sensitive ending.
JavaScript✓ Tested
Check whether text starts with a prefix
JavaScript: Use startsWith for a literal case-sensitive prefix comparison.
JavaScript✓ Tested
Check whether text starts with a prefix
TypeScript: Use startsWith for a literal case-sensitive prefix comparison.
TypeScript✓ Tested
Choose a service’s internal hostname
Docker / Compose: hostname controls the name reported inside the container.
Docker / Compose✓ Tested
Choose an equality function for signal values
Choose an equality function for signal values with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Choose an image’s default directory
Docker / Compose: Choose an image’s default directory with a complete introductory Dockerfile.
Docker / Compose✓ Tested
Choose Bash with pipefail for build commands
Docker / Compose: SHELL changes the interpreter for subsequent shell-form instructions.
Docker / Compose✓ Tested
Choose between two branches
JavaScript: Use if and else to handle an available or empty stock count.
JavaScript✓ Tested
Choose between two render branches
Choose between two render branches with a small React component and explicit browser behavior.
React✓ Tested
Choose labels from a language context
Choose labels from a language context with a small React component and explicit browser behavior.
React✓ Tested
Choose template content with @switch
Choose template content with @switch with a standalone Angular component and explicit browser behavior.
Angular✓ Tested