1.1.6 • Published 2 years ago

gdpr-toolkit v1.1.6

Weekly downloads
35
License
MIT
Repository
github
Last release
2 years ago

gdpr-toolkit

A library to easier comply with GDPR regulations (anonymization, pseudonymization) in JavaScript applications with zero production dependencies.

Supports IPv4 and IPv6 addresses.

Installation

yarn add gdpr-toolkit

Usage

IPv4

const gdpr = require('gdpr-toolkit')

const ipv4 = '256.256.256.256' 

const ipv4a = gdpr.anonymizeIp(ipv4)

console.log(ipv4a)
// 256.256.256.0

IPv6

const gdpr = require('gdpr-toolkit')

const ipv6 = 'e2ae:3624:7586:f0c4:5b14:39f0:1560:2e83'

const ipv6a = gdpr.anonymizeIp(ipv6)

console.log(ipv6a)
// e2ae:3624:7586:0:0:0:0:0

Licence

MIT

1.1.6

2 years ago

1.1.5

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago