Results for “Asynchronous work & URI handling”
Small, practical examples. Search by task or narrow things down below.
Expose observation without exposing resolution
jQuery: promise returns an interface without resolve or reject methods.
jQuery✓ Tested
Extract text by start and end positions
JavaScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.
JavaScript✓ Tested
Extract text by start and end positions
TypeScript: String slice uses an inclusive start and exclusive end measured in UTF-16 code units.
TypeScript✓ Tested
Extract the text after the last delimiter
JavaScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
JavaScript✓ Tested
Extract the text after the last delimiter
TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.
TypeScript✓ Tested
Flatten a single nesting level
JavaScript: flat defaults to a depth of one and creates a new array.
JavaScript✓ Tested
Flatten a single nesting level
TypeScript: flat defaults to a depth of one and creates a new array.
TypeScript✓ Tested
Generate a bounded integer range
JavaScript: Array.from supplies each output position to its mapping function.
JavaScript✓ Tested
Generate a bounded integer range
TypeScript: Array.from supplies each output position to its mapping function.
TypeScript✓ Tested
Handle a terminating error
Catch conversion failures and produce a clear fallback.
try catch✓ Tested
Handle an expected child-process failure
Python: Catch CalledProcessError when check=True reports a nonzero exit status.
Python✓ Tested
Ignore a result after its effect is cleaned up
Ignore a result after its effect is cleaned up with a small React component and explicit browser behavior.
React✓ Tested