Results for “Input streams & redirection”
Small, practical examples. Search by task or narrow things down below.
Associate a label with an input
Give an HTML text input an accessible name using for and id.
HTML✓ Tested
Associate help text with an input
HTML: aria-describedby references supplementary instructions separately from the input’s name.
HTML✓ Tested
Bind a numeric input value
Bind a numeric input value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Check whether input is a nonnegative integer
Reject empty input and nonnumeric characters before arithmetic.
validation✓ Tested
Concatenate arrays without mutating either input
JavaScript: concat creates a shallow combined sequence.
JavaScript✓ Tested
Concatenate arrays without mutating either input
TypeScript: concat creates a shallow combined sequence.
TypeScript✓ Tested
Constrain a calendar date input
HTML: Use ISO date values for the date control’s minimum and maximum.
HTML✓ Tested
Control a text input
Control a text input with a small React component and explicit browser behavior.
React✓ Tested
Derive a value from an input signal
Derive a value from an input signal with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Detect NaN without converting the input
JavaScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
JavaScript✓ Tested
Detect NaN without converting the input
TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.
TypeScript✓ Tested
Distinguish an empty input line from end of input
Bash Scripts: A successful read can return an empty value; its status indicates whether a line was read.
Bash Scripts✓ Tested