BACK
Referencetimestamp
Reference · 114

timestamp

timestamp

rxjs.dev

Adds a timestamp to each value.

Signature

timestamp(): OperatorFunction>

What it does

Wraps each value in a { value, timestamp } object. The timestamp comes from a TimestampProvider or Date.now.

When to use

Time-stamping events, simple diagnostics, auditing user actions.

See also

timeInterval, map

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...