Class: Note

.models. Note

A class representing a Note

new Note( [data])

Create a new Note
Parameters:
Name Type Argument Description
data Object | String <optional>
The raw data for this note, either as an object or a string. If a string, the string will become the value of the "text" property of the note.
Properties
Name Type Argument Description
dateCreated String | Date <optional>
The date this note was originally created, as either a Date object or a valid date-time string.
dateModified String | Date <optional>
The date this note was last modified, eitehr as a Date object or a valid date-time string.
language String <optional>
The abbreviation for the language this note is written in. Must be a valid Abbreviation.
person String <optional>
The abbreviation of the person who is the source of the information in this note (not necessarily the person who wrote it), as a string. Must be a valid Abbreviation.
text String The text of this note, as a string in a single orthography. Create a new note object to use other orthographies.
type String <optional>
The type of note. Must be one of the following: `note-to-self`, `general`, `anthropology`, `discourse`, `encyclopedic`, `grammar`, `phonology`, `semantics`, `sociocultural`.
Properties:
Name Type Description
dateCreated Date The date this note was originally created, as a Date object
dateModified Date The date this note was last modified, as a Date object. This property is automatically updated whenever a property of the note is altered.
language String The abbreviation for the language this note is written in, as a string.
person String The abbreviation of the person who is the source of the information in this note (not necessarily the person who wrote it).
text String The text of this note
type String The type of note
Examples
const note = new Note({
  text:     'This is a note.',
  language: 'eng',
});

console.log(note.text); // This is a note.
const note = new Note('This is a note.');
console.log(note.text); // 'This is a note.'