Skip to content

Transformer

A base class for transformers.

Import:

import { Transformer } from 'obsidian-dev-utils/transformers/transformer';

Signature:

export class Transformer

Methods

MethodReturnsDescription
canTransform(value, key)booleanDetermines if the transformer can transform the given value.
getTransformer(transformerId)TransformerGets the transformer with the given id.
getTransformerId(value, key)null | stringGets the id of the transformer that can transform the given value.
restoreValue(transformedValue, key)unknownRestores the given value.
transformObjectRecursively(value)GenericObjectTransforms the given object recursively.
transformValue(value, key)unknownTransforms the given value.

Links to this page: