Constructor
new Bookmark(title, type, createdAt, updatedAtopt)
- Source:
Example
import { Bookmark } from "@thoughtsunificator/bookmarks-document"
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
title |
string | ||
type |
Symbol | ||
createdAt |
Date | Valid ISO 8601 date string |
|
updatedAt |
Date |
<optional> |
Valid ISO 8601 date string |
Members
(readonly) FOLDER :Symbol
- Source:
Type:
- Symbol
(readonly) LINK :Symbol
- Source:
Type:
- Symbol
ownerDocument :BookmarksDocument
- Source:
Type:
type :Symbol
- Source:
Type:
- Symbol
parent :BookmarkFolder
- Source:
Type:
- BookmarkFolder
attributes :object
- Description:
All attributes must be valid keys and values according to JSON.stringify.
- Source:
All attributes must be valid keys and values according to JSON.stringify.
Type:
- object
previousSibling :Bookmark
- Source:
Type:
nextSibling :Bookmark
- Source:
Type:
previousFolderSibling :BookmarksDocument
- Source:
Type:
nextFolderSibling :BookmarksDocument
- Source:
Type:
path :string
- Source:
Type:
- string
Methods
(abstract) serialize() → {object}
- Description:
Return a list of properties that can then be serialized into a string
- Source:
Returns:
- Type
- object
(abstract) clone() → {Bookmark}
- Description:
Returns a duplicate of the current Bookmark.
- Source:
Returns:
- Type
- Bookmark
rename(newTitle)
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
newTitle |
string |
ascendantsUnfolded() → {boolean}
- Description:
Whether all ascendants are unfolded
- Source:
- To Do:
-
- move out
Returns:
- Type
- boolean
getDepth() → {Number}
- Description:
How deep the bookmark is in the hierarchy
- Source:
- To Do:
-
- move out
Returns:
- Type
- Number
remove()
- Description:
Remove from the document
- Source: