Class: Tiddler
tiddler.Tiddler
Table of contents
Constructors
Properties
Methods
- getFieldDay
- getFieldList
- getFieldString
- getFieldStringBlock
- getFieldStrings
- hasField
- hasTag
- isDraft
- isEqual
- isPlugin
Constructors
constructor
• new Tiddler(...tiddlers
): Tiddler
Parameters
Name | Type | Description |
---|---|---|
...tiddlers | (Tiddler | Record <string , unknown >)[] | multiple tiddler fields or instances, will merge them to create a new one |
Returns
Defined in
Properties
cache
• Readonly
cache: ITiddlerCache
Defined in
fields
• Readonly
fields: ITiddlerFields
Defined in
fieldModules
▪ Static
fieldModules: Record
<string
, IModuleInfo
>
Defined in
Methods
getFieldDay
▸ getFieldDay(field
): string
Parameters
Name | Type |
---|---|
field | string |
Returns
string
Defined in
getFieldList
▸ getFieldList(field
, defaultValue?
): string
[]
Get the value of a field as a list
Parameters
Name | Type |
---|---|
field | string |
defaultValue? | string |
Returns
string
[]
Defined in
getFieldString
▸ getFieldString(field
, defaultValue?
): string
Stringify the field with the associated tiddler field module (if any)
Parameters
Name | Type |
---|---|
field | string |
defaultValue? | string |
Returns
string
Defined in
getFieldStringBlock
▸ getFieldStringBlock(options
): string
Get all the fields as a name:value block.
Parameters
Name | Type |
---|---|
options | Object |
options.exclude? | string [] |
Returns
string
Defined in
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
Name | Type |
---|---|
options? | Object |
options.exclude? | string [] |
Returns
Record
<string
, string
>
Defined in
hasField
▸ hasField(field
): boolean
Parameters
Name | Type |
---|---|
field | string |
Returns
boolean
Defined in
hasTag
▸ hasTag(tag
): boolean
Parameters
Name | Type |
---|---|
tag | string |
Returns
boolean
Defined in
isDraft
▸ isDraft(): boolean
Returns
boolean
Defined in
isEqual
▸ isEqual(tiddler
, excludeFields?
): boolean
Parameters
Name | Type |
---|---|
tiddler | Tiddler |
excludeFields? | string [] |
Returns
boolean
Defined in
isPlugin
▸ isPlugin(): boolean
Returns
boolean