Members
(constant) CaloricContent :Map.<string, number>
- CaloricContent.WATER = 0
- CaloricContent.SUCROSE = 4
- CaloricContent.ETHANOL = 7
Caloric content in kcal/g.
Type:
- Map.<string, number>
- Source:
(constant) Density :Map.<string, number>
- Density.WATER = 0.998
- Density.SUCROSE = 1.5859
- Density.ETHANOL = 0.78816
Common densities at 20°C.
Type:
- Map.<string, number>
- Source:
(constant) Lang :Map.<string, Object.<string, string>>
Language packs
Type:
- Map.<string, Object.<string, string>>
- Source:
(constant) Measure :Map.<string, MeasureVariant>
Relative
- Measure.DENSITY: density, g/ml, [0..Inf]
- Measure.ABV: alcohol by volume, % ABV, [0..100]
- Measure.BRIX: brix degree, ° Brix, [0..100]
- Measure.WW: mass fraction, %w/w, [0..1]
- Measure.WV: mass_concentration, %w/v, [0..Inf]
- Measure.VV: volume fraction, %v/v, [0..1]
- Measure.CW: caloric content, kcal/g [0..Inf]
Absolute
- Measure.L: liter
- Measure.ML: milliliter
- Measure.OZ: US fluid ounce
- Measure.G: gram
- Measure.KG: kilogram
- Measure.CAL: calorie
- Measure.KCAL: kilocalorie
Measures.
Type:
- Map.<string, MeasureVariant>
- Source:
Methods
round(value, precisionopt) → {number}
Round with a given precision
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
value |
number | |||
precision |
number |
<optional> |
1 |
- Source:
Returns:
- Type
- number
Example
// returns 10
round(9.5317);
// returns 9.5317
round(9.5317, 0.000001);
// returns 9.5
round(9.5317, 0.1);
// returns 9.6
round(9.5317, 0.2);
Type Definitions
CompositionInfo
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
volume |
number | total volume, ml |
weight |
number | total weight, g |
density |
number | density, g/ml |
abs_spirit |
number | absolute spirit, ml |
abv |
number | alcohol by volume, % |
sugar |
number | total sugar, g |
- Source:
IngredientType
Type:
- string
- Source:
LanguagePack
Type:
- Map.<code, template>
- Source:
MakeFrom
Type:
- Object
Properties:
| Name | Type | Attributes | Default | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alcohol |
Alcohol |
<optional> |
main alcohol |
|||||||||||||
syrup |
Syrup |
<optional> |
main syrup/sugar |
|||||||||||||
priority |
'alcohol' | 'syrup' |
<optional> |
'alcohol' | priority in constructions |
||||||||||||
basis |
Object |
<optional> |
calculation basis Properties
|
|||||||||||||
fallback |
Object |
<optional> |
fallback ingredients Properties
|
- Source:
MeasureVariant
Type:
- string
- Source:
Translatable
Type:
- string | TranslatableObject | TranslatableObjectFull
- Source:
TranslatableObject
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
TranslatableObject.code |
string | code from language pack |
TranslatableObject.data |
string | data for default {value} tag |
- Source:
TranslatableObjectFull
Type:
- Object
Properties:
| Name | Type | Description |
|---|---|---|
TranslatableObjectFull.code |
string | code from language pack |
TranslatableObjectFull.data |
Object.<string, any> | any data |
- Source: