Variable
| Static Public Summary | ||
| public |
flag: Quality If |
|
| public |
fudgeAdjective: Quality Shortcut for |
|
| public |
integer: Quality Decimals are truncated from the value when displaying. |
|
| public |
namedChoice: Quality Simple transform of one value to another. |
|
| public |
nonZeroInteger: Quality Same as |
|
| public |
onOff: Quality Displays |
|
| public |
Object containing all qualities indexed by key. |
|
| public |
raw: Quality Displays the value unchanged. |
|
| public |
wordScale: Quality Map an integer value to a word list, with optional offset. |
|
| public |
yesNo: Quality Same oas |
|
Static Public
public flag: Quality source
import flag from 'jumbogrove/src/jg/qualities/flag.js'If value is true, some text appears. Otherwise, no text appears.
Example:
{
initialValue: true|false,
name: 'This text appears in the sidebar if true, otherwise nothing'
}
public fudgeAdjective: Quality source
import fudgeAdjective from 'jumbogrove/src/jg/qualities/fudgeAdjective.js'Shortcut for wordScale with a word list of 'terrible', 'poor', 'mediocre', 'fair', 'good', 'great', 'superb'
where -3 = terrible, 0 = fair, and 3 = superb.
Example:
{
initialValue: 0, // a number
}
public integer: Quality source
import integer from 'jumbogrove/src/jg/qualities/integer.js'Decimals are truncated from the value when displaying.
Example:
{
initialValue: 0, // a number
}
public namedChoice: Quality source
import namedChoice from 'jumbogrove/src/jg/qualities/namedChoice.js'Simple transform of one value to another.
Example:
{
initialValue: 'foo', // anything
labelMap: {'foo': 'bar'}, // renders 'foo' as 'bar'
}
public nonZeroInteger: Quality source
import nonZeroInteger from 'jumbogrove/src/jg/qualities/nonZeroInteger.js'Same as integer, but doesn't appear in sidebar if equal to zero.
Example:
{
initialValue: 0, // a number
}
public onOff: Quality source
import onOff from 'jumbogrove/src/jg/qualities/onOff.js'Displays on/off based on value truthiness (if no words provided), or
words[0]/words[1] (falsey word comes first)
Example:
{
initialValue: true|false,
words: ['nope', 'yep']
}
public qualities: object source
import qualities from 'jumbogrove/src/jg/qualities/index.js'Object containing all qualities indexed by key.
public raw: Quality source
import raw from 'jumbogrove/src/jg/qualities/raw.js'Displays the value unchanged.
Example:
{
initialValue: 'whatever',
}
public wordScale: Quality source
import wordScale from 'jumbogrove/src/jg/qualities/wordScale.js'Map an integer value to a word list, with optional offset.
Example:
{
initialValue: 0, // a number
words: ['bad', 'ok', 'good'],
offset: 0 // rendered text = words[value + offset]
}
public yesNo: Quality source
import yesNo from 'jumbogrove/src/jg/qualities/yesNo.js'Same oas onOf, but defaults to yes / no.
Example:
{
initialValue: true|false,
}
