Socket
Socket
Sign inDemoInstall

@persona-js/verify

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@persona-js/verify - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

package.json
{
"name": "@persona-js/verify",
"version": "0.2.0",
"version": "0.2.1",
"description": "An unofficial Persona client to verify customers",

@@ -14,3 +14,3 @@ "main": "./dist/index.js",

},
"gitHead": "0783bb13fcdbfb078f14164411d91092b46bcb97"
"gitHead": "048c33426c996e6e11606fec956cd9de00f63375"
}
# @persona-js/verify
An unofficial Persona client to verify customers
[![npm](https://img.shields.io/npm/v/@persona-js/verify.svg?style=for-the-badge)](https://www.npmjs.com/package/@persona-js/verify)
A vanilla JavaScript module to run embedded/hosted flow without any dependencies, against [the official npm module](https://www.npmjs.com/package/persona) which has some dependencies in both internally/externally.
⚠️ This package is still in beta and missing many features of official module, so don't recommend using in production.
## Install

@@ -11,16 +15,23 @@

## Usage (Expected)
## Usage
```ts
import { newInquiry } from '@persona-js/verify'
const verificationWithPersona = newInquiry('template_id').on('start', () => { /* what I want to do on start inquiry flow */ })
const TEMPLATE_ID = 'tmpl_xyzxyzxyz'
verificationWIthPersona.on('complete', () => { /* what I want to do on complete inquiry flow */ })
const verificationWithPersona = newInquiry(TEMPLATE_ID)
verificationWithPersona.prefill({ ... })
// prefilling
verificationWithPersona.prefill({ nameFirst: 'Kengo' })
verificationWithPersona.start()
verificationWithPersona.getHostedFlowUrl()
// Also constructor function can accepts prefiling
newInquiry(TEMPLATE_ID, { prefill: { nameFirst: 'Kengo' } })
verificationWithPersona.start() //=> Embedded flow starts on current window
verificationWithPersona.getHostedFlowUrl() //=> Returns URL for the hosted flow
// Unsupported yet
verificationWIthPersona.on('start', () => { /* what I want to do on start inquiry flow */ })
verificationWIthPersona.on('complete', () => { /* what I want to do on complete inquiry flow */ })
```

@@ -31,1 +42,12 @@

MIT
## ToDo
- Support event listeners
- Resume inquriy demo
- Style polishing
- mobile
- transition
- a11y
- Test
- Build for CDN distribution
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