JSPM

handprintjs

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q22520F
  • License BUSL-1.1

Patented user handprinting library. Requires a handprintjs.com account

Package Exports

  • handprintjs
  • handprintjs/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (handprintjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

HandprintJS

This repo contains the npm module for installing HandprintJS.

https://www.npmjs.com/package/handprintjs

Installing

npm i handprintjs

Usage

// Required: initialize the library
// Note: you can find your handprint endpoint by logging into your account
handprint.load('https://your-handprint-endpoint/js');

// (Optional) link the handprint to an account
handprint.identify('user123', {'name': 'John'}, 'account')

// (Optional) listen for flags
handprint.on('flag', (flag) => {
    // do something with the flag
    console.log('flag received', flag)
})

// Required: track an event
// e.g. 'Page visit', 'Sign up', 'Product review', 'Load application', etc
handprint.track('Page visit')

// or, if you want to associate the event with additional properties
handprint.track('Page visit', {'foo': 'bar'})

// Get the user information, including their handprint
handprint.get().then((visitorInfo) => {
    console.log(visitorInfo);
})