iya-sts
    Preparing search index...

    Variable checkDocument

    checkDocument: (
        value: any,
        where: any,
        opts: any,
    ) => { ok: boolean; value: any } = checkDocument

    Type Declaration

      • (value: any, where: any, opts: any): { ok: boolean; value: any }
      • Checks an arbitrary JSON document without a schema: no polluting key at any depth, a bounded depth and a bounded key count.

        The value is returned unchanged on success; it is a check, never a transform.

        Parameters

        • value: any

          the parsed document

        • where: any

          what the document is, for the refusal and the log

        • opts: any

          optional maxDepth (12 by default) and maxKeys (4096)

        Returns { ok: boolean; value: any }

        { ok: true, value } or a refusal