{"_id":"@alexkeating/common-utilities","name":"@alexkeating/common-utilities","dist-tags":{"latest":"0.0.11"},"versions":{"0.0.11":{"name":"@alexkeating/common-utilities","version":"0.0.11","type":"commonjs","homepage":"https://github.com/HausDAO/daohaus-monorepo#readme","issues":"https://github.com/HausDAO/daohaus-monorepo/issues?q=is%3Aissue+is%3Aopen","license":"MIT","keywords":["daohaus","common-utilities","daohaus utils","daohaus utilities"],"repository":{"type":"git","url":"git+ssh://git@github.com/HausDAO/daohaus-monorepo.git","directory":"libs/common-utilities"},"main":"./src/index.js","typings":"./src/index.d.ts","dependencies":{"ethers":"^5.6.5","react":"^18.2.0","date-fns":"^2.28.0","numbro":"^2.3.6","react-hook-form":"^7.33.1","tslib":"^2.0.0"},"peerDependencies":{},"gitHead":"dc36ebdb7c308a5b8b6cf4dabe3f996a665bf250","description":"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.","bugs":{"url":"https://github.com/HausDAO/daohaus-monorepo/issues"},"_id":"@alexkeating/common-utilities@0.0.11","_nodeVersion":"18.7.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-heXZCOmJ2hOgw50yOKcGip2bOYtwzr6D99SRsHv92OJd/Yl87j7j/W6YhBAI34TMxE1yo+K6zCjUJyQYpO5Cvg==","shasum":"f88f5afb733b358d75e03ea3be8fe62de6ba3fc4","tarball":"https://registry.npmjs.org/@alexkeating/common-utilities/-/common-utilities-0.0.11.tgz","fileCount":96,"unpackedSize":73537,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtcLLnEHfd6qBZCdie4wAreLo+f+7nXeF4GSRELPHaDQIgJSRPHOY7lVBLE7U4TotYHsxMfG+NBy36uTZIVw59Kkg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjElVAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocrA/6A8LkSDO58LQFIb1I8s/UxJDaEJhtEDdBsW8A4RMi/7AGJVEy\r\nNI79s1oa/CuKe8A9hWsT3nY6ZshtCgFmZOBdtL6g4WtVIn13pSsbeyFB4Enm\r\n9qpGahCJS2k5Qx4SouvwhhQz3uN6UJeHyDlmatWXTGD7GIipjLgxj2IdeclP\r\nY60n4nPynd/PJxldmftbTzmVyvLGZAIyzLG/vrLK1coHQKtgvIs8njhaRlXT\r\nVKAseLk9xuI80vDnmjhZH9LDVnSmXh0hze8kwClEBqm20IAYRV7mork6myb9\r\n+qATlIWbSKOgScJnBQMvteneoO+MNQBkbq5+5751JHykVOpyYmBWoZSGsg6I\r\nsIr0YCKsgSOWOz4iM/kInHGSDFJlY8YI9xFh8FjddLZehWM0cMcXrVQrqaKV\r\ncEAJC34utw2zGsfPGC05LhzJj3QIElchSoZgwNlUEaAIHQhCcBLlpuQcCeBT\r\nGdT4GSFuAyA08hbUQKQZy2Xo4hllajIKDNCNPY2+8EKf7YOfnRFUR2sW+L+D\r\nvqOVUzTT7UjylpX+sh0xistUQ2h7/8K2dBMuOt8dak043b7cp1PrrmYCXsQU\r\nrCi9mX1kX4Q0Q9MtJ13mwLWq8ZU14P0mviphbI4dlEZOkKzNl4+S94x5nvvW\r\n85tOt+rUSb7vExhGICppNstYSZuLh2XQP5E=\r\n=dIRK\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"alexkeating","email":"atk315315@gmail.com"},"directories":{},"maintainers":[{"name":"alexkeating","email":"atk315315@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/common-utilities_0.0.11_1662145855940_0.77133140779133"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-02T19:10:55.875Z","0.0.11":"2022-09-02T19:10:56.157Z","modified":"2022-09-02T19:10:56.274Z"},"maintainers":[{"name":"alexkeating","email":"atk315315@gmail.com"}],"description":"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.","homepage":"https://github.com/HausDAO/daohaus-monorepo#readme","keywords":["daohaus","common-utilities","daohaus utils","daohaus utilities"],"repository":{"type":"git","url":"git+ssh://git@github.com/HausDAO/daohaus-monorepo.git","directory":"libs/common-utilities"},"bugs":{"url":"https://github.com/HausDAO/daohaus-monorepo/issues"},"license":"MIT","readme":"# Common Utilities\n\nOur **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.\n\nThis library was generated with [Nx](https://nx.dev).\n\n## Installation\n\nOnce 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.\n\nThe 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';`\n\n## Overview\n\nFuture documentation will go more in depth about each part of the common utilities package, but for now, here is an overview of each folder:\n\n### Constants\n\n**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.\n\n`chainData.ts`\n\nThis 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.\n\nThere 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.\n\n`contracts.ts`\n\nExports contract addresses for contracts that we commonly use throughout our packages.\n\n`endpoints.ts`\n\nExports the endpoints for the `V3_SUBGRAPH`, `EXPLORERS`, and the `GNOSIS_API`.\n\n`proposals.ts`\n\nThis contains our commonly used proposal statuses.\n\n### Types\n\nThis folder contains commonly used types such as ones that relate to contracts, keychains, and a React _setter_ pattern.\n\n### Utils\n\nThis folder is a collection of utility functions mostly related to data formatting, processing, and encoding.\n\n## Usage\n\nAll 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.\n\nIf you wanted to import the `addKeychain` function, you would do:\n\n```typescript\nimport { addKeychain } from '@daohaus/common-utilities';\n```\n\nSimilarly, if you wanted to use the `EXPLORER` constant, you can import the `ENDPOINTS` constant object and then reference the `EXPLORER` constant with `ENDPOINTS.EXPLORER`.\n","readmeFilename":"README.md"}