Members
(package, constant) debugging :boolean
Type:
- boolean
- Source:
(constant) DiaryStandardRecordStatus :string
Type:
- string
Properties:
Name | Type | Description |
---|---|---|
awake |
string | user is currently awake |
in_bed |
string | user is in bed but not asleep |
asleep |
string | user is asleep |
"lights off" |
string | user is currently turning off the lights in preparation to go to bed |
"lights on" |
string | user is currently turning on the lights after getting out of bed |
snack |
string | user is eating some food, but not a full meal |
meal |
string | user is eating a full meal |
alcohol |
string | user is consuming alcohol |
chocolate |
string | user is consuming chocolate |
caffeine |
string | user is consuming caffeine |
drink |
string | user is consuming a drink that doesn't fit into any other category |
"sleep aid" |
string | user is taking a sleeping pill, tranqulisier, or other medication to aid sleep |
exercise |
string | user is exercising |
toilet |
string | user is using the toilet |
noise |
string | user is experiencing noise that disturbs their sleep |
alarm |
string | user's wake-up alarm is trying to wake them up |
"in bed" |
string | user is currently getting into bed |
"out of bed" |
string | user is currently getting out of bed |
- Source:
(constant) sleepdiary_engines :Array.<DiaryEngine>
Type:
- Array.<DiaryEngine>
- Source:
- Tutorials:
-
- Tutorial: List supported engines
system_timezone
- Source:
Methods
new_sleep_diary(file, serialiseropt) → {Object|null}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
file |
string | Object | file contents, or filename/contents pairs (for archive files) | |
serialiser |
function |
<optional> |
function to serialise output |
- Source:
Throws:
Returns:
- Type
- Object | null
Example
let diary = new_sleep_diary(contents_of_my_file));
Type Definitions
Array
- Source:
DiaryEngine
Type:
- Object
- Source:
DiaryStandardRecord
Type:
- Object
- Source:
DiaryStandardStatistics
Type:
- Object
- Source:
MaybeDiaryStandardStatistics
Type:
- null | DiaryStandardStatistics
- Source:
SpreadsheetHighLevelCellRule
Define a high-level rule for serialising/parsing a spreadsheet cell.
key should be the name of a member of the relevant data structure, type should be number, time, duration or string (the default). If regexp is passed, the value is expected to match that pattern.
Type:
- Object
- Source:
SpreadsheetLowLevelCellRule
Define a low-level rule for serialising/parsing a series of cells.
keys should be a non-empty array of member names that will be created. import and export are functions that take three arguments (array_element, row and offset) and return a value that indicates whether the operation was a success. import is expected to copy values from row to array_element, wheraes export copies data back to row.
Type:
- Object
- Source:
SpreadsheetSheetRule
Define the conversion to/from a single sheet in the spreadsheet.
sheet should be the name of the sheet in the spreadsheet. member should be the name of the associated member in the data structure (if different from sheet).
Type:
- Object
- Source: