npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@datafund/consent-generator

v0.1.2

Published

React plugin for generating a Consent Receipt (CR) JSON server-side.

Downloads

3

Readme

Consent Generator

React plugin for generating a Consent Receipt (CR) JSON server-side.

Quick Use

Download package using npm:

$ npm install --save @datafund/consent-generator
                              

Import package to your React app:

import { ConsentGenerator } from 'consent-generator';

Prepare Consent Receipt data:

let formData = {
   "version": "Kantara_v1.1",
    "consentTimestamp": 1559734117,
    "collectionMethod": "Web form",
    "consentReceiptID": "d03bdfed-708a-4792-b6d2-eb336000359f",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnzyis1ZjfNB0bBgKFMSv\nvkTtwlvBsaJq7S5wA+kzeVOVpVWwkWdVha4s38XM/pa/yr47av7+z3VTmvDRyAHc\naT92whREFpLv9cj5lTeJSibyr/Mrm/YtjCZVWgaOYIhwrXwKLqPr/11inWsAkfIy\ntvHWTxZYEcXLgAXFuUuaS3uF9gEiNQwzGTU1v0FqkqTBr4B8nW3HCN47XUu0t8Y0\ne+lf4s4OxQawWD79J9/5d3Ry0vbV3Am1FtGJiJvOwRsIfVChDpYStTcHTCMqtvWb\nV6L11BWkpzGXSW4Hv43qa+GSYOD2QU68Mb59oSk2OB+BtOLpJofmbGEGgvmwyCI9\nMwIDAQAB\n-----END PUBLIC KEY-----",
    "language": "English",
    "piiPrincipalId": "[email protected]",
    "piiControllers": [
      {
        "address": {},
        "piiController": "Datafund",
        "contact": "Jani Podatek",
        "email": "[email protected]",
        "phone": "+386 0000000",
        "piiControllerUrl": "http://datafund.io"
      }
    ],
    "policyUrl": "https://datafund.io/legal/privacy_policy.html",
    "services": [
      {
        "service": "Service example 1",
        "purposes": [
          {
            "purpose": "Core Function",
            "consentType": "explicit",
            "purposeCategory": [
              "Billing"
            ],
            "piiCategory": [
              "Email",
              "Phone number"
            ],
            "primaryPurpose": true,
            "termination": "1 year",
            "thirdPartyDisclosure": false
          }
        ]
      },
      {
        "service": "Service example 2",
        "purposes": [
          {
            "purpose": "Marketing",
            "consentType": "explicit",
            "purposeCategory": [
              "Direct marketing",
              "Delivery"
            ],
            "piiCategory": [
              "Home address",
              "Email address",
              "Phone number"
            ],
            "termination": "1 year",
            "thirdPartyDisclosure": true,
            "thirdPartyName": "AnalyticsRus"
          }
        ]
      }
    ],
    "sensitive": true,
    "spiCat": [
      "Health status",
      "Genetic data"
    ],
    "jurisdiction": "SI"
}

Add API root URL parameter:

let APIroot = "http://localhost:5000/api/v1/"

Add properties for verifying token:

let verifyOptions = {
                issuer: "issuer",
                subject: "subject",
                audience: "audience",
                expiresIn: "12h",
                algorithm: "RS256"
}

Include component in render() method of your app:

<ConsentGenerator formData={{formData}} APIroot={{APIroot}} verifyOptions={{verifyOptions}} />

Props :hammer_and_wrench:

  • formData (json)
  • APIroot (string)
  • verifyOptions (json)