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

handshake-regex

v2021.6.1

Published

Regular expression for matching Handshake (HNS) wallet addresses

Downloads

7

Readme

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!