rmapi-js
    Preparing search index...

    Class PageMetadata

    a page's -metadata.json, which names its layers

    Its edits are recorded like Metadata's, each layer its own field.

    Hierarchy (View Summary)

    Index
    • get hasEdits(): boolean

      whether an edit changes the file from the version as read

      Returns boolean

    • every key the core does not read

      Returns Record<string, Json>

    • remove a key of the file: a key the core reads clears its field, or sets it to what a file without the key reads it as

      Parameters

      • key: string

      Returns this

      Warning: as for setExtra, this can leave the file at odds with itself. Prefer the field's own setter.

      ValidationError if key names a field the file must have; the file is left as it was

    • set a key of the file: a key the core reads sets its field, and any other is kept in extra

      Parameters

      • key: string
      • value: Json

      Returns this

      Warning: a key the core reads is written as given, past the rules its own setter keeps, so it can leave the file at odds with itself, such as a pageCount that does not count the pages listed. Prefer the field's own setter, such as setPages for the page keys.

      ValidationError if value is not a value of the field key names; the file is left as it was

    • set the layer at index, from zero, where an index past the last adds it

      Parameters

      Returns this

      RangeError if index is not an integer from 0 to 2^32 - 1

    • the file with its edits made, as the account holds it

      Returns Uint8Array

    • the file with its edits made, as JSON

      Returns Record<string, Json>

    • read a page's -metadata.json from what toJSON gave, or a copy of it; the core checks every field

      Parameters

      • value: unknown

      Returns PageMetadata

      TypeError if value is not an object