Results for “cr”
Small, practical examples. Search by task or narrow things down below.
Clean up a generator after an early break
JavaScript: Breaking a for-of loop closes a generator and runs its finally block.
JavaScript✓ Tested
Clean up a generator after an early break
TypeScript: Breaking a for-of loop closes a generator and runs its finally block.
TypeScript✓ Tested
Collect two independent background results
Bash Scripts: Write each job’s output separately and wait for both before combining results.
Bash Scripts✓ Tested
Combine text with a name
JavaScript: Construct a greeting from a fixed prefix and a stored name.
JavaScript✓ Tested
Combine text with a name
TypeScript: Construct a greeting from a fixed prefix and a stored name.
TypeScript✓ Tested
Compare a value literally inside a conditional
Bash Scripts: Quoting the right side of an equality test makes wildcard characters literal.
Bash Scripts✓ Tested
Compare a value with a limit
JavaScript: Turn a comparison into a readable yes or no result.
JavaScript✓ Tested
Compare a value with a limit
TypeScript: Turn a comparison into a readable yes or no result.
TypeScript✓ Tested
Compare bounded floating-point results with a tolerance
JavaScript: Use an absolute error threshold for values known to be near one.
JavaScript✓ Tested
Compare bounded floating-point results with a tolerance
TypeScript: Use an absolute error threshold for values known to be near one.
TypeScript✓ Tested
Compare canonically equivalent Unicode text
JavaScript: Normalize to NFC before comparing equivalent composed and decomposed text.
JavaScript✓ Tested
Compare canonically equivalent Unicode text
TypeScript: Normalize to NFC before comparing equivalent composed and decomposed text.
TypeScript✓ Tested