Socket
Socket
Sign inDemoInstall

asdfgh

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asdfgh

Asynchronous wrapper around zxcvbn


Version published
Weekly downloads
552
decreased by-23.23%
Maintainers
1
Weekly downloads
 
Created
Source

asdfgh

Asynchronous wrapper for use of zxcvbn in npm

For now, this only works when used in conjunction with tooling like Webpack or Browserify. It is not build to be used in Node.js directly.

Installation

npm i asdfgh

Usage

import asdfgh from 'asdfgh'

// by default loads from cdnjs
// override with optional setting
//
// asdfgh.setDefaults(url, integritySRI, timeoutMS)
async function checkPassphrase(pwd) {
  try {
    var result = await asdfgh(pwd);
    ...
  } catch(err) {
    ...
  }
}

Interface

  • asdfgh(passphrase, user_inputs) - exports a function which is a promisified wrapper for zxcvbn

    • arguments: see zxcvbn
  • asdfgh.setDefaults(url, integritySRI, timeoutMS)

    • Must be callsed before any passphrase checks are started
    • default:
    • url (default cloudflare/cdnjs) is the location of the zxcvbn.js to load
    • integritySRI [optional] integrity SRI for script element
    • timeoutMS [optional] milliseconds to wait for zxcvbn to load before timing out

    License

    MIT License

Keywords

FAQs

Package last updated on 31 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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