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

@alexkeating/common-utilities

v0.0.11

Published

Our **Common Utilities** package is a set of helper tools and utilities that are used throughout our libraries and apps. This includes things like our constants, types that are commonly shared across packages, and various utilities and helper functions.

Downloads

7

Readme

Common Utilities

Our Common Utilities package is a set of helper tools and utilities that are used throughout our libraries and apps. This includes things like our constants, types that are commonly shared across packages, and various utilities and helper functions.

This library was generated with Nx.

Installation

Once this package is published on npm we'll have instructions in how to import and use in your apps. If you're using it from inside the monorepo, you can import directly from the package.

The package name for importing is @daohaus/common-utilities. If you're working on another package inside the monorepo, such as a feature or an app, you can reference it via this namespace, such as import { addKeychain } from '@daohaus/common-utilities';

Overview

Future documentation will go more in depth about each part of the common utilities package, but for now, here is an overview of each folder:

Constants

Constants are a set of constants that are used throughout our libraries and apps that we need to frequently use and that we want to ensure are consistent.

chainData.ts

This contains constants and helpers related to working with networks. For example, the VALID_NETWORKS is a list of the networks that we currently support in our apps.

There are several utility functions related to the network as well, such as getNetwork, isValidNetwork, and addKeychain. These are used throughout our apps and libraries, and we'll be including deeper documentation about them in the future.

contracts.ts

Exports contract addresses for contracts that we commonly use throughout our packages.

endpoints.ts

Exports the endpoints for the V3_SUBGRAPH, EXPLORERS, and the GNOSIS_API.

proposals.ts

This contains our commonly used proposal statuses.

Types

This folder contains commonly used types such as ones that relate to contracts, keychains, and a React setter pattern.

Utils

This folder is a collection of utility functions mostly related to data formatting, processing, and encoding.

Usage

All of the constants, types, and utilities can be imported directly from the package. You don't need to specify that you're importing from types, for example.

If you wanted to import the addKeychain function, you would do:

import { addKeychain } from '@daohaus/common-utilities';

Similarly, if you wanted to use the EXPLORER constant, you can import the ENDPOINTS constant object and then reference the EXPLORER constant with ENDPOINTS.EXPLORER.