ip-devicer
    Preparing search index...

    Function computeConsistencyScore

    • Score how closely the current IP enrichment matches the latest device history.

      The score is a weighted sum of country (40), ASN (30), city (20), and network-flag consistency (10). Missing values are treated as neutral so they do not penalize the score.

      Parameters

      • current: IpEnrichment

        Current enrichment result for the incoming IP.

      • history: IpSnapshot[]

        Historical IP snapshots for the same device, newest first.

      Returns number

      Consistency score in [0, 100] where 100 means fully consistent.