anidb-udp-client
    Preparing search index...

    Function decodeFileState

    • Decodes the state field returned by file(), file_by_hash() and file_by_episode().

      When neither censored nor uncensored is set, AniDB has no censorship information for the file.

      Parameters

      • state: string | number

        raw state value

      Returns DecodedFileState

      const { censored, uncensored } = decodeFileState((await client.file(fid, [ 'state' ])).state)