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

curator-bb

v0.1.1-beta

Published

<!-- # React + TypeScript + Vite

Downloads

85

Readme

version npm package minimized gzipped size (select exports) downloads jsdelivr NPM

Description :-

curator-bb - used to validate users at any web form. It is made up of React, TypeScript & Vite.

i). Overview

  • The Curator Web SDK serves the primary purpose of validating preregistered users to enhance client app privacy and protect against potential security threats.
  • The package exposes two key APIs: 'initialize' and 'curate'.
  • The 'initialize' API facilitates the registration of users on the client app by making a request to the Axiom Protect server. This request includes parameters such as serverURL, operatorId, appId, and password.
  • Users are required to define their form key name fields for inclusion in the Axiom policy under the pre-registration tab.
  • Upon submitting the form, the 'curate' API is invoked, sending a request to the server, which responds with either 'true' or 'false' based on user validation. This information determines whether the user can proceed with the registration process in the client app.

Installation :-

i). Install at HTML pages

  • Step 1: Be ready with HTML form and import the package
<script type="module">
   // import curator package
   import curatorBB from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'
</script>
  • Step 2: Initially, call initialize function to get the curator service
   // initialize curator operator
   curatorBB.initialize({
      serverURL: string,
      operatorId: string,
      appId:string,
      password: string,
      onMessage: (arg) => { }
   });

Note: It is recommended to call initialize function before calling user validator.

| Key | Required | value | Description | | ----------- | :-----------: | :-----------: | :----------- | | serverURL | true | string | It is used call the back office server base URL. | | operatorId | true | string | It is used to identify the operator/developer, who created account at back office. | | appId | true | string | It is used to uniquely identify the application. | | password | true | string | It is used to validate the operator/developer. | | onMessage | false | function | It is used get the response with more details (Optional). |

  • Step 3: Call curate function to get the curator service
   // form submission with curator for validating user
   curatorBB.curate({
      userDetails: object, 
      onMessage: (arg) => { }
   });

Note: It is recommended to call curate function after initializing the operator/developer. And make sure you prevent default.

Example :-

document.addEventListener("DOMContentLoaded", function () {
   document.getElementById("myForm").addEventListener("submit", function (event) {
      // Prevent the default form submission behavior
      event.preventDefault();
      ...
      // call curate
      curatorBB.curate({
         ...
      });
   }
}

| Key | Required | value | Description | | ----------- | :-----------: | :-----------: | :----------- | | userDetails | true | object | It is used to get the user details, given in the form. |
| onMessage | false | function | It is used get the response with more details (Optional). |

You can get the return response or can use onMessage to know more about the return response. Use with one argument and check for arg.code

  • 0 - failed message
  • 1 - success message
  • 2 - info message
  • -1 - error message

Authors