Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Document

A document belonging to a Collection with an inner value.

Hierarchy

  • Document

Index

Properties

Readonly _id

Returns the ID of the document.

Readonly _pathAt

_pathAt: (key: string) => DocumentPath

Type declaration

Readonly _value

Returns the content (aka value) of the document.

Methods

Static hash

  • hash(documentOrMany: any): BigInt
  • Returns a hash that represents the passed in document(s).

    Parameters

    • documentOrMany: any

    Returns BigInt

Static hashMnemonic

  • hashMnemonic(documentOrMany: any): string
  • Returns a pattern of words that together create a mnemonic, which represents the passed in document(s).

    Parameters

    • documentOrMany: any

    Returns string

Static id

  • Returns the ID for a document.

    Parameters

    • document: any

    Returns DocumentID

Static pathAt

  • pathAt(document: any, key: string, skipValidation?: boolean): DocumentPath
  • Returns a document path object for a given key for a document.

    Parameters

    • document: any
    • key: string
    • Optional skipValidation: boolean

    Returns DocumentPath

Static value

  • Returns the content (aka inner value) of a document.

    Parameters

    • document: any

    Returns DocumentValue