FIND YOUR NEXT FEW LINES

Results for “strict”

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

268 snippets foundClear filters
TypeScriptObject behavior & collections

Copy nested structured data independently

TypeScript: structuredClone creates an independent copy of supported structured values.

TypeScript✓ Tested
TypeScriptUTC date operations

Count days between UTC-midnight dates

TypeScript: A day is exactly 86400000 milliseconds for these explicitly UTC-midnight inputs.

TypeScript✓ Tested
TypeScriptGetting Started

Count the items in a collection

TypeScript: Read the collection’s length instead of hard-coding the loop limit.

TypeScript✓ Tested
TypeScriptText handling & Unicode

Count Unicode code points in a string

TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

TypeScript✓ Tested
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
AngularServices & dependency injection

Create a dependency with a provider factory

Create a dependency with a provider factory with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularPipes & formatting

Create a small pure formatting pipe

Create a small pure formatting pipe with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptArray restructuring

Create independent rows in a matrix

TypeScript: Use a mapping function to create each row instead of sharing one array with fill.

TypeScript✓ Tested
TypeScriptRegular expressions & URL encoding

Decode a percent-encoded URL component

TypeScript: decodeURIComponent reverses percent encoding and throws for malformed sequences.

TypeScript✓ Tested
TypeScriptPromises & iteration protocols

Delegate iteration to another iterable

TypeScript: yield-star forwards items from another iterable while retaining generator composition.

TypeScript✓ Tested
SQLGetting Started

Delete one row from a practice table

SQL: Restrict DELETE with a primary-key condition and verify the remaining row count.

SQL✓ Tested
SQL ServerGetting Started

Delete one row from a practice table

SQL Server: Restrict DELETE with a primary-key condition and verify the remaining row count.

SQL Server✓ Tested