DurationTransformer
A transformer that converts a Duration to an ISO string and back.
Import:
import { DurationTransformer } from '@mnaoumov/obsidian-lib/transformers/duration-transformer';Signature:
export class DurationTransformer extends TypedTransformer<moment.Duration, string>Extends: TypedTransformer<moment.Duration, string>
Methods
| Method | Returns | Description |
|---|---|---|
| canTransform(value) | value is moment.Duration | Checks if the value is a Duration. |
| restoreValue(transformedValue) | moment.Duration | Restores the value from a string. |
| transformValue(value) | string | Transforms the value to a string. |