BookmarkFolder

bookmark-folder~ BookmarkFolder

new BookmarkFolder(title, createdAt, updatedAtopt, root)

Description:
  • A BookmarkFolder can hold references to link and folders

Source:
Example
import { BookmarkFolder } from "@thoughtsunificator/bookmarks-document"
Parameters:
Name Type Attributes Default Description
title string
createdAt Date null

Valid ISO 8601 date string

updatedAt Date <optional>
null

Valid ISO 8601 date string

root boolean false

Members

DEFAULT_TITLE :str

Source:
Type:
  • str

children :Array.<Bookmark>

Description:
  • Returns the children of this BookmarkFolder

Source:

Returns the children of this BookmarkFolder

Type:

root

Description:
  • Whether the BookmarkFolder is the root BookmarkFolder of the BookmarksDocument

Source:

Whether the BookmarkFolder is the root BookmarkFolder of the BookmarksDocument

unfolded

Description:
  • Whether the children are made visible Used to preserved the unfold state when moving a bookmark

Source:

Whether the children are made visible Used to preserved the unfold state when moving a bookmark

childFolders :Array.<BookmarkFolder>

Description:
  • Returns the children BookmarkFolder of this BookmarkFolder

Source:

Returns the children BookmarkFolder of this BookmarkFolder

Type:
  • Array.<BookmarkFolder>

firstBookmark :Bookmark

Source:
Type:

firstBookmarkFolder :BookmarkFolder

Source:
Type:
  • BookmarkFolder

lastBookmark :Bookmark

Source:
Type:

lastBookmarkFolder :BookmarkFolder

Source:
Type:
  • BookmarkFolder

Methods

clone(deep) → {BookmarkFolder}

Source:
To Do:
  • original property to access the original bookmark
Parameters:
Name Type Description
deep boolean
Returns:
Type
BookmarkFolder

appendChild(bookmark)

Description:
  • Add a child Bookmark to this BookmarkFolder

Source:
Parameters:
Name Type Description
bookmark Bookmark

removeChild(bookmark)

Description:
  • Remove a child Bookmark from this BookmarkFolder

Source:
Parameters:
Name Type Description
bookmark Bookmark

contains() → {boolean}

Description:
  • Whether a Bookmark is contained in the BookmarkFolder

Source:
To Do:
  • move out
Returns:
Type
boolean

insertBefore(newBookmark, referenceBookmark)

Source:
Parameters:
Name Type Description
newBookmark Bookmark
referenceBookmark Bookmark

insertAfter(newBookmark, referenceBookmark)

Source:
Parameters:
Name Type Description
newBookmark Bookmark
referenceBookmark Bookmark

serialize() → {object}

Description:
  • Return the serializable version of a BookmarkFolder (removing any unwanted properties)

Source:
Returns:
Type
object