Results for “if”
Small, practical examples. Search by task or narrow things down below.
Restore the previous document title
Restore the previous document title with a small React component and explicit browser behavior.
React✓ Tested
Schedule a one-time update with cleanup
Schedule a one-time update with cleanup with a small React component and explicit browser behavior.
React✓ Tested
Serialize an object
Turn a JavaScript object into JSON text.
JavaScript✓ Tested
Share state between sibling controls
Share state between sibling controls with a small React component and explicit browser behavior.
React✓ Tested
Skip synchronization when a feature is disabled
Skip synchronization when a feature is disabled with a small React component and explicit browser behavior.
React✓ Tested
Split a line into named fields
Read a simple delimiter-separated line into variables.
read✓ Tested
Start an existing container and attach to its output
Docker / Compose: create records the command; start with attach runs that existing container.
Docker / Compose✓ Tested
Stop a running container gracefully
Docker / Compose: stop sends the configured stop signal and waits before forcing termination.
Docker / Compose✓ Tested
Subscribe to and clean up a window event
Subscribe to and clean up a window event with a small React component and explicit browser behavior.
React✓ Tested
Summarize added and removed lines numerically
Git: Numstat provides tab-separated counts suitable for processing.
Git✓ Tested
Test whether tracked working files changed
Git: A quiet diff returns status one for differences, so handle it in a conditional.
Git✓ Tested
Transform an observable value
Transform an observable value with a standalone Angular component and explicit browser behavior.
Angular✓ Tested