Results for “tr”
Small, practical examples. Search by task or narrow things down below.
Describe an object with an interface
Require named fields on a reusable object shape.
interface✓ Tested
Detect an invalid Date object
TypeScript: An invalid Date has a NaN time value.
TypeScript✓ 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
Disable a button
Set the live disabled property with jQuery prop.
jQuery✓ Tested
Disable an action while it is pending
Disable an action while it is pending with a small React component and explicit browser behavior.
React✓ Tested
Disable an unavailable action
Disable an unavailable action with a small React component and explicit browser behavior.
React✓ Tested
Dispatch a command through function pointers
Arduino / C: A small function table can map validated command indices to actions.
Arduino / C✓ Tested
Dispatch a one-character serial command
Arduino / C: A switch provides explicit handling for accepted and unknown commands.
Arduino / C✓ Tested
Display a bounded slice of a list
Display a bounded slice of a list with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Display a calculated form result
HTML: An output element can name the input controls contributing to its value.
HTML✓ Tested
Display a component field with interpolation
Display a component field with interpolation with a standalone Angular component and explicit browser behavior.
Angular✓ Tested