Hide last ip numbers for given ip, like
129.89.5.243
->129.89.x.xxx
or79.100.175.45
to79.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 withreturn
{String}
Example:
var anonymizeIp = ; ;//=> 79.100.xx.xxx ;//=> 231.77.***.* ;//=> 129.89._.___ ;//=> 92.189.xxx.xx
Author
Charlike Mike Reagent
Copyright (c) 2014-2015 Charlike Mike Reagent, contributors.
Released under the MIT
license.
Powered and automated by kdf, February 3, 2015