anonymize-ip

    1.0.1 • Public • Published

    npm mit license build status coverage status deps status

    Hide last ip numbers for given ip, like 129.89.5.243 -> 129.89.x.xxx or 79.100.175.45 to 79.100.xxx.xx. Or replace them with custom mask.

    Install

    npm i --save anonymize-ip
    npm test
    

    API

    For more use-cases see the tests

    anonymizeIp

    Anonymize given ip address.

    • <ip> {String} valid ip address
    • [mask] {String} symbol to replace with
    • return {String}

    Example:

    var anonymizeIp = require('anonymize-ip');
     
    anonymizeIp('79.100.75.145');
    //=> 79.100.xx.xxx
     
    anonymizeIp('231.77.134.6', '*');
    //=> 231.77.***.*
     
    anonymizeIp('129.89.5.243', '_');
    //=> 129.89._.___
     
    anonymizeIp('92.189.231.21', [1,2,3]);
    //=> 92.189.xxx.xx

    Author

    Charlike Mike Reagent

    License MIT license

    Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
    Released under the MIT license.


    Powered and automated by kdf, February 3, 2015

    Install

    npm i anonymize-ip

    DownloadsWeekly Downloads

    12

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • vanchoy
    • tunnckocore