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

@manifoldxyz/js-ts-utils

v9.0.2

Published

JS and TS Utils for Manifold Devs

Readme

@manifoldxyz/js-ts-utils

Build Status

Useful functions and constants for Manifold devs in JS/TS.

Features

  • Manifold eslint/prettier
  • vitest w/ coverage reporting
  • @ path alias import { gm } from '@/gm'
  • ci github workflow + badges for build, lint, test status

Commands

npm run test                   # run the test suite in watch mode
npm run build                  # build the library in ./dist
npm run format                 # run prettier on the files

Contributing

Please make a Pull Request for all proposed changes. Your pull request should always include unit test additions or modifications. Your pull request must pass all unit tests and linting tests. Once reviewed and passing, you can merge.

An example PR: https://github.com/manifoldxyz/js-ts-utils/pull/1

Releasing

  • Bump the version in package.json
  • Any merge or commit of that change to main will trigger the CI release action
  • This will create a new version on npm matching the package.json (will not overwrite) and will create a new GH release for the version (will overwrite).

Coverage

If you run npm run coverage and the file you are modifying now has either less coverage or does not have near 90 coverage, please add the missing coverage.

Migration

7.1.0 -> 7.2.0

  • Breaking: getInstanceLink's first argument is now an object with preview and workspaceSlug properties
  • Breaking: PLATFORM_MAP[Platform.Manifold].url function generates new Manifold.xyz links if contract id, workspace identifier are provided

3.0.x to 4.0.0

  • Breaking: getNetworkNameForNetworkId is now getDisplayNameForNetworkId

2.0.0 -> 2.1.0

  • New: Added Telemetry module
  • New: Added Apps module

1.3.2 to 1.4.0

  • Breaking: getManifoldGalleryBaseURL is now getManifoldMarketplaceBaseURL
  • Breaking: getManifoldGalleryTokenURL is now getManifoldMarketplaceTokenURL
  • Breaking: getNetworkNameforNetworkId (sic) is now getNetworkNameForNetworkId
  • Breaking: PLATFORM_MAP[Platform.Manifold].url function generates new Manifold.gallery links

<1.0.0 to 1.0.0

If you are not using "type: module" in your package.json, you will have to use the CommonJS builds of this library which are only available in version 1.0.0 and greater.

<= 0.3.2 to 0.3.5

FIXED ESM build should be working properly in >= 0.3.5.

NEW You can import parts of the library now:

import { StringUtils } from '@manifoldxyz/js-ts-utils';

const addressAbbreviated = StringUtils.abbreviateAddress(
  '0x1234567890abcdef1234567890abcdef1234567890',
);

// or you can do
import { abbreviateAddress } from '@manifoldxyz/js-ts-utils/StringUtils';

const addressAbbreviated = abbreviateAddress('0x1234567890abcdef1234567890abcdef1234567890');

0.2.x to 0.3.x

This library now is using ESM.

  • network module:
    • Breaking: types are now PascalCase and singular instead of ALL_CAPS_SNAKE_CASE and plural
      • SUPPORTED_NETWORKS is now SupportedNetwork
    • Breaking: SUPPORTED_NETWORKS_ARRAY is now a const array, meaning that the types can be properly inferred
      • Subsequently, SupportedNetwork properly returns a limited set of NetworkId enum values (instead of number previously), and isSupportedNetwork narrows the network types properly
    • Breaking: the NETWORK_IDS and NETWORK_NAMES enums have been replaced by NetworkId enum with two inferred types, NetworkName and CapitalizedNetworkName. NetworkId values are also PascalCase.
      • New: Added additional testnet ids to NetworkId enum
    • New: Added MAIN_NETWORKS and TEST_NETWORKS constant arrays with corresponding types MainNetwork and TestNetwork
    • Adjusted: isTestnet depends on whether the network is in TEST_NETWORKS array
    • New: Added resolveChainIdByName function to map from a network name to a network id