New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

handshake-regex

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

handshake-regex

Regular expression for matching Handshake (HNS) wallet addresses

  • 2021.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

handshake-regex

Regular expression for matching Handshake (HNS) wallet addresses

Install

$ npm i handshake-regex

Notes

  • Version 31 Handshake addresses are techinically valid but they are also unspendable. For the sake of this module, those addresses are deemed invalid.

Usage

// Import the default export
import dap from "handshake-regex";

dap("hs1q98ddwl2lcpnnzfvvrqad80qu97w0q72cyq2uy3");
// ^ Returns true

dap("3MWvddmToBWnnPes3L45i1pRQDhPrLdznc");
// ^ Returns false
// Or, export the named function
import { handshakeRegex } from "handshake-regex";

handshakeRegex("hs1q98ddwl2lcpnnzfvvrqad80qu97w0q72cyq2uy3");
// ^ Returns true

handshakeRegex("3MWvddmToBWnnPes3L45i1pRQDhPrLdznc");
// ^ Returns false

API

handshakeRegex(suppliedString)

suppliedString

Type: string (required)

  • If nothing is supplied, an error is returned. Gotta love types.
  • If you supply a nonsense string or non-Handshake wallet address, the response is false.

Tests

# Run all tests, sequentially
$ npm test

# Test dependencies for latest versions
$ npm run test:dependencies

# Lint "src" directory
$ npm run test:typescript

# Test this module
$ npm run test:assert

Support

I don't drink coffee so if you like this module and want to support me, feel free to send some HNS to hs1q98ddwl2lcpnnzfvvrqad80qu97w0q72cyq2uy3!

FAQs

Package last updated on 01 Jun 2021

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