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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@blockdrops/modern-web

v1.3.1

Published

Modern methods for modern apps

Readme

modernWeb

A wrapper around multiple functions that simplify life of a modern nodejs developer

Important note

While we are glad that this package is being actively used and downloaded, we did not expect such a huge number of downloads. Hence, we are rushing to document the package. Please bear with us.

What is modernWeb?

modernWeb is a package that provides many functions as a module, and has to be used in conjunction with import statements either in a nodejs environment or using transpilers like parcelJS (which we used and tested against this package).

The package itself needs dependencies that you can install by npm install.

Features and methods

publicMessagingKey

Alias for getPublicMessagingKey method, which returns the public key (if generated) contained in the current environment.

publicMessagingKeyPem

Alias for getPublicMessagingKeyPem method, which returns the public key (if generated) contained in the current environment in PEM format.

publicKeyToPem

Alias for forge.pki.publicKeyToPem

publicKeyFromPem

Alias for forge.pki.publicKeyFromPem

signMessage

Given a ethers.js compliant wallet, sign a message using the wallet itself

verifySignature

Verify a ethers.js compliant signature (also web3 compliant of course) against an address

hashMessage

Returns the keccak256 hash of a message

convertObjectToBinary

Returns a binary representation in string format of any object

convertBinaryToObject

Returns an object from a string binary representation of it

resStreamString

Stream a string over a 'res' object compatible with Express response objects

resStreamObject

Stream an object over a 'res' object compatible with Express response objects

randomString

Generates a random string

generateKeys

Generates a deterministic RSA keypair (for example from a signature)

encryptMessage

Encrypts a message using the public key of the generated keypair

decryptMessage

Decrypts a message using the private key of the generated keypair

RSASignature

Sign a message using the private key of the generated keypair

verifyRSASignature

Verify a message using the public key provided

decode64

Alias for forge.util.decode64

encode64

Alias for forge.util.encode64