igpapi — Instagram private API Simulator for Node.js (API reference) 4.19.0
    Preparing search index...

    Function splitJsonDocuments

    • Split a body into its consecutive top-level JSON documents, preserving each document's exact text. Throws on a malformed tail so the caller reports a ParseError rather than silently dropping data. onDocument, when given, sees each document as it is split, so a caller keeps the documents before a malformed tail even though the call throws.

      Parameters

      • text: string
      • OptionalonDocument: (document: string) => void

      Returns readonly string[]