Skip to main content

tw5-typed / tiddler / Tiddler

Class: Tiddler

tiddler.Tiddler

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Tiddler(...tiddlers): Tiddler

Parameters

NameTypeDescription
...tiddlers(Tiddler | Record<string, unknown>)[]multiple tiddler fields or instances, will merge them to create a new one

Returns

Tiddler

Defined in

src/tiddler/index.d.ts:27

Properties

cache

Readonly cache: ITiddlerCache

Defined in

src/tiddler/index.d.ts:20


fields

Readonly fields: ITiddlerFields

Defined in

src/tiddler/index.d.ts:22


fieldModules

Static fieldModules: Record<string, IModuleInfo>

Defined in

src/tiddler/index.d.ts:18

Methods

getFieldDay

getFieldDay(field): string

Parameters

NameType
fieldstring

Returns

string

Defined in

src/tiddler/index.d.ts:42


getFieldList

getFieldList(field, defaultValue?): string[]

Get the value of a field as a list

Parameters

NameType
fieldstring
defaultValue?string

Returns

string[]

Defined in

src/tiddler/index.d.ts:46


getFieldString

getFieldString(field, defaultValue?): string

Stringify the field with the associated tiddler field module (if any)

Parameters

NameType
fieldstring
defaultValue?string

Returns

string

Defined in

src/tiddler/index.d.ts:36


getFieldStringBlock

getFieldStringBlock(options): string

Get all the fields as a name:value block.

Parameters

NameType
optionsObject
options.exclude?string[]

Returns

string

Defined in

src/tiddler/index.d.ts:52


getFieldStrings

getFieldStrings(options?): Record<string, string>

Get all the fields as a hashmap of strings. Options: exclude: an array of field names to exclude

Parameters

NameType
options?Object
options.exclude?string[]

Returns

Record<string, string>

Defined in

src/tiddler/index.d.ts:41


hasField

hasField(field): boolean

Parameters

NameType
fieldstring

Returns

boolean

Defined in

src/tiddler/index.d.ts:30


hasTag

hasTag(tag): boolean

Parameters

NameType
tagstring

Returns

boolean

Defined in

src/tiddler/index.d.ts:29


isDraft

isDraft(): boolean

Returns

boolean

Defined in

src/tiddler/index.d.ts:32


isEqual

isEqual(tiddler, excludeFields?): boolean

Parameters

NameType
tiddlerTiddler
excludeFields?string[]

Returns

boolean

Defined in

src/tiddler/index.d.ts:54


isPlugin

isPlugin(): boolean

Returns

boolean

Defined in

src/tiddler/index.d.ts:31