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

    Function idsAsText

    • Internal

      Turns every number that sits under an id key of a parsed answer into its text, in place, and returns the answer. It is the last step of the core's one reader in its response mode (jsonWithLongIdsAsText), so every server answer the library reads — a plain JSON answer, a streamed one, an error body, a Bloks or GraphQL body, a raw node — has its ids as text, whichever path reads it. The reader already gives an id of more than 15 digits as its exact text and a shorter one as a number; this gives the library's callers one shape for one kind of value, and the shape is IdAsText's (the text of the number). A zero the server writes as an id (a placeholder such as "assigned_admin_id": 0) is the text '0', as the server sent it. A list under an id key (user_ids, and a list of lists) turns its numbers the same way. A string, a null or an object under such a key is left as it came, and every other key is only walked.

      Type Parameters

      • T

      Parameters

      • answer: T

      Returns T