Socket
Book a DemoInstallSign in
Socket

anonymize-ip

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anonymize-ip

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.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

anonymize

FAQs

Package last updated on 03 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts