Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gdpr-guard

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gdpr-guard - npm Package Compare versions

Comparing version 1.0.3 to 1.1.0

dist/serde/GdprDeserializer.d.ts

12

dist/gdpr_guard.d.ts

@@ -1,6 +0,6 @@

import { makeGuard } from "./GdprGuard";
import { GdprGuardGroup } from "./GdprGuardGroup";
import { GdprManager } from "./GdprManager";
import { GdprStorage } from "./GdprStorage";
import { GdprManagerBuilder } from "./builders/builders";
export { makeGuard, GdprGuardGroup, GdprManager, GdprStorage, GdprManagerBuilder, };
export { makeGuard } from "./GdprGuard";
export { GdprGuardGroup } from "./GdprGuardGroup";
export { GdprManager } from "./GdprManager";
export { GdprStorage, storageFromOrdinal } from "./GdprStorage";
export { GdprManagerBuilder } from "./builders/builders";
export { GdprDeserializer } from "./serde/GdprDeserializer";

@@ -11,2 +11,3 @@ declare enum GdprStorage {

}
export { GdprStorage, };
declare const storageFromOrdinal: (key: number) => GdprStorage | null;
export { GdprStorage, storageFromOrdinal, };
{
"name": "gdpr-guard",
"version": "1.0.3",
"version": "1.1.0",
"author": "Voltra <ludwig.guerin.98@gmx.fr>",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/Voltra/gdpr-guard#readme",

@@ -10,7 +10,15 @@ # gdpr-guard

import {
//most useful
GdprStorage,
GdprManagerBuilder,
GdprDeserializer,
//helpers
makeGuard,
GdprGuardGroup,
GdprManager,
GdprStorage,
GdprManagerBuilder,
GdprSerializer,
//for completion
storageFromOrdinal,
} from "gdpr-guard"

@@ -22,7 +30,15 @@ ```

const {
//most useful
GdprStorage,
GdprManagerBuilder,
GdprDeserializer,
//helpers
makeGuard,
GdprGuardGroup,
GdprManager,
GdprStorage,
GdprManagerBuilder,
GdprSerializer,
//for completion
storageFromOrdinal,
} = require("gdpr-guard");

@@ -34,7 +50,15 @@ ```

const {
//most useful
GdprStorage,
GdprManagerBuilder,
GdprDeserializer,
//helpers
makeGuard,
GdprGuardGroup,
GdprManager,
GdprStorage,
GdprManagerBuilder,
GdprSerializer,
//for completion
storageFromOrdinal,
} = gdprGuard;

@@ -91,2 +115,32 @@ ```

### GdprDeserializer
`GdprDeserializer` allows you to retrieve a gdpr object from its `raw` representation.
```javascript
import { GdprManagerBuilder, GdprDeserializer } from "gdpr-guard"
// [...]
const manager = GdprManagerBuilder.make()
// [...]
.build();
const raw = manager.raw();
//store in local storage
const raw = //get from local storage
const manager = GdprDeserializer.manager(raw);
if(manager === null){ //failed deserialization
//handle error
return;
}
// here, both managers are equivalent
```
### GdprManager

@@ -93,0 +147,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc