Skip to content

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

MethodReturnsDescription
canTransform(value)value is moment.DurationChecks if the value is a Duration.
restoreValue(transformedValue)moment.DurationRestores the value from a string.
transformValue(value)stringTransforms the value to a string.