gdpr-guard
Advanced tools
Comparing version 1.0.3 to 1.1.0
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277583
18
1097
186
4
1