FIND YOUR NEXT FEW LINES

Results for “then”

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

703 snippets foundClear filters
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested
RustGetting Started

Destructure a tuple

Destructure a tuple in a complete Rust program using the standard library.

Rust✓ Tested
TypeScriptUTC date operations

Detect an invalid Date object

TypeScript: An invalid Date has a NaN time value.

TypeScript✓ Tested
RustParsing & byte data

Detect invalid UTF-8 data

Detect invalid UTF-8 data in a complete Rust program using the standard library.

Rust✓ Tested
TypeScriptNumbers & numeric validation

Detect NaN without converting the input

TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.

TypeScript✓ Tested
AngularReactive forms

Disable a control through its model

Disable a control through its model with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
Docker / ComposeGetting Started

Disable networking for a Compose command

Docker / Compose: Disable networking for a Compose command in a small Compose file.

Docker / Compose✓ Tested
AngularPipes & formatting

Display a bounded slice of a list

Display a bounded slice of a list with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularGetting Started

Display a component field with interpolation

Display a component field with interpolation with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
TypeScriptNumbers & numeric validation

Display a number with a fixed decimal width

TypeScript: toFixed returns a formatted string rather than a numeric value.

TypeScript✓ Tested
AngularReactive forms

Display a specific reactive validation error

Display a specific reactive validation error with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
AngularAccessibility & reusable patterns

Display untrusted-looking text without HTML execution

Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.

Angular✓ Tested