@yorkie-js/sdk
    Preparing search index...

    Class Primitive

    Primitive represents primitive data type including logical clock. It has a type and a value.

    Hierarchy

    • CRDTElement
      • Primitive
    Index

    Constructors

    Methods

    • getDataSize returns the data usage of this element.

      Returns DataSize

    • getMetaUsage returns the meta usage of this element.

      Returns number

    • getPositionedAt returns the time of this element when it was positioned in the document by undo/redo or move operation.

      Returns TimeTicket

    • isRemoved check if this element was removed.

      Returns boolean

    • toSortedJSON returns the sorted JSON encoding of the value.

      Returns string

    • getPrimitiveType returns the primitive type of the value.

      Parameters

      • value: unknown

      Returns PrimitiveType | undefined

    • isInteger checks if the given number is integer.

      Parameters

      • num: number

      Returns boolean

    • isSupport check if the given value is supported type.

      Parameters

      • value: unknown

      Returns boolean