FIND YOUR NEXT FEW LINES

Results for “STRICT”

Small, practical examples. Search by task or narrow things down below.

268 snippets foundClear filters
TypeScriptRegular expressions & URL encoding

Build a URL query string from values

TypeScript: URLSearchParams handles query escaping and repeated parameter appends.

TypeScript✓ Tested
TypeScriptObject behavior & collections

Build an object from key-value entries

TypeScript: Object.fromEntries converts an iterable of pairs into ordinary own properties.

TypeScript✓ Tested
TypeScriptNumbers & numeric validation

Calculate a page count with ceiling division

TypeScript: Use Math.ceil for a nonnegative item count and a positive page size.

TypeScript✓ Tested
TypeScriptGetting Started

Calculate a simple total

TypeScript: Multiply a unit price by a quantity, then add a delivery fee.

TypeScript✓ Tested
AngularGetting Started

Calculate a value in a template

Calculate a value in a template with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptArray restructuring

Calculate differences between adjacent readings

TypeScript: Slice off the first value and compare each remaining value with its predecessor.

TypeScript✓ Tested
TypeScriptNumbers & numeric validation

Calculate integers beyond Number’s precise range

TypeScript: Use BigInt operands together to avoid precision loss.

TypeScript✓ Tested
AngularGetting Started

Call a component method from an event

Call a component method from an event with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptGetting Started

Call a library function

TypeScript: Use a standard absolute-value function with a small negative number.

TypeScript✓ Tested
AngularPipes & formatting

Capitalize words with TitleCasePipe

Capitalize words with TitleCasePipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularServices & dependency injection

Centralize a reusable validation rule

Centralize a reusable validation rule with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptArray traversal & selection

Check array membership with includes

TypeScript: includes uses SameValueZero comparison, which also matches NaN.

TypeScript✓ Tested