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

    Function idAsJsonNumber

    • An id the library took from a server answer, written where the app writes it as a JSON number: a JsonNumberLiteral of the id's exact digits, so a long id loses none (a Number(id) would round it past 15 digits). JSON.stringify writes it as that literal. A request built from an answer never dies on a value the Simulator has not met (answers it has seen are samples): an id that is no canonical integer (NumericIdText: empty, signed, with a leading zero, with a letter) cannot be a JSON number, so it is written as a JSON string of its text, as the answer gave it.

      Parameters

      • id: string

      Returns string | JsonNumberLiteral