Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FlatNotepad

A FlatNotepad is similar to the Notepad class, but it stores all the notes/sections as in flat structures. FlatNotepads will likely be better for internal use in many situations.

Something to remember is that all operations on this class like addSection, will return a new object of this class, and not modify the existing one.

Hierarchy

  • FlatNotepad

Index

Constructors

constructor

  • new FlatNotepad(title: string, opts?: FlatNotepadOptions): FlatNotepad

Properties

Optional Readonly crypto

crypto: EncryptionMethod

Readonly lastModified

lastModified: string

Readonly notepadAssets

notepadAssets: string[]

Readonly notes

notes: {}

Type declaration

  • [internalRef: string]: Note

Readonly sections

sections: {}

Type declaration

  • [internalRef: string]: FlatSection

Readonly title

title: string

Methods

addAsset

addNote

addSection

clone

  • clone(opts?: Partial<FlatNotepadOptions>, title?: string): FlatNotepad

modified

pathFrom

search

  • search(trie: Trie, query: string): Note[]
  • Unlike the Notepad, this uses an indexed lookup system. This should be faster than a traditional notepad search.

    Parameters

    • trie: Trie

      The search trie for the notepad

    • query: string

      Can either be a title-search or a hashtag-search

    Returns Note[]

toNotepad

Static makeFlatSection

  • makeFlatSection(title: string, parentRef?: string): FlatSection
  • Parameters

    • title: string
    • Optional parentRef: string

    Returns FlatSection

Generated using TypeDoc