Catalog npm
Back to packageRELEASE DETAILS

6.3.0

npm

@0x/utils

0x TS utils

Published6 Apr 2021
Direct dependencies27
Transitive dependenciesNot calculated

README

Current package documentation

@0x/utils

Utils to be shared across 0x projects and packages

Installation

yarn add @0x/utils

If your project is in TypeScript, add the following to your tsconfig.json:

"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}

Usage

import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0x/utils';

Troubleshooting

If you are still seeing TS type errors complaining about missing DOM types such as Response:

error TS2304: Cannot find name 'Response'.

Then you need to explicitly add the dom lib to your compiler options in tsconfig.json. The dom library is included by default, but customizing the lib option can cause it to be dropped.

"compilerOptions": {
    "lib": [..., "dom"],

Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our contribution guidelines before getting started.

Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

yarn config set workspaces-experimental true

Then install dependencies

yarn install

Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

PKG=@0x/utils yarn build

Or continuously rebuild on change:

PKG=@0x/utils yarn watch

Clean

yarn clean

Lint

yarn lint

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 27

Native requirements
27 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
chalk
Environment
{
  "local_name": "chalk",
  "alias": false,
  "peer_metadata": null
}
^2.3.0runtime
ethers
Environment
{
  "local_name": "ethers",
  "alias": false,
  "peer_metadata": null
}
~4.0.4runtime
lodash
Environment
{
  "local_name": "lodash",
  "alias": false,
  "peer_metadata": null
}
^4.17.11runtime
js-sha3
Environment
{
  "local_name": "js-sha3",
  "alias": false,
  "peer_metadata": null
}
^0.7.0runtime
@0x/types
Environment
{
  "local_name": "@0x/types",
  "alias": false,
  "peer_metadata": null
}
^3.3.2runtime
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
12.12.54runtime
detect-node
Environment
{
  "local_name": "detect-node",
  "alias": false,
  "peer_metadata": null
}
2.0.3runtime
@types/mocha
Environment
{
  "local_name": "@types/mocha",
  "alias": false,
  "peer_metadata": null
}
^5.2.7runtime
bignumber.js
Environment
{
  "local_name": "bignumber.js",
  "alias": false,
  "peer_metadata": null
}
~9.0.0runtime
ethereum-types
Environment
{
  "local_name": "ethereum-types",
  "alias": false,
  "peer_metadata": null
}
^3.4.1runtime
ethereumjs-util
Environment
{
  "local_name": "ethereumjs-util",
  "alias": false,
  "peer_metadata": null
}
^5.1.1runtime
isomorphic-fetch
Environment
{
  "local_name": "isomorphic-fetch",
  "alias": false,
  "peer_metadata": null
}
2.2.1runtime
@0x/typescript-typings
Environment
{
  "local_name": "@0x/typescript-typings",
  "alias": false,
  "peer_metadata": null
}
^5.1.7runtime
abortcontroller-polyfill
Environment
{
  "local_name": "abortcontroller-polyfill",
  "alias": false,
  "peer_metadata": null
}
^1.1.9runtime
shx
Environment
{
  "local_name": "shx",
  "alias": false,
  "peer_metadata": null
}
^0.2.2development
chai
Environment
{
  "local_name": "chai",
  "alias": false,
  "peer_metadata": null
}
^4.0.1development
mocha
Environment
{
  "local_name": "mocha",
  "alias": false,
  "peer_metadata": null
}
^6.2.0development
tslint
Environment
{
  "local_name": "tslint",
  "alias": false,
  "peer_metadata": null
}
5.11.0development
dirty-chai
Environment
{
  "local_name": "dirty-chai",
  "alias": false,
  "peer_metadata": null
}
^2.0.1development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
4.2.2development
npm-run-all
Environment
{
  "local_name": "npm-run-all",
  "alias": false,
  "peer_metadata": null
}
^4.1.2development
@types/lodash
Environment
{
  "local_name": "@types/lodash",
  "alias": false,
  "peer_metadata": null
}
4.14.104development
chai-bignumber
Environment
{
  "local_name": "chai-bignumber",
  "alias": false,
  "peer_metadata": null
}
^3.0.0development
chai-as-promised
Environment
{
  "local_name": "chai-as-promised",
  "alias": false,
  "peer_metadata": null
}
^7.1.0development
@0x/tslint-config
Environment
{
  "local_name": "@0x/tslint-config",
  "alias": false,
  "peer_metadata": null
}
^4.1.4development
@types/detect-node
Environment
{
  "local_name": "@types/detect-node",
  "alias": false,
  "peer_metadata": null
}
2.0.0development
make-promises-safe
Environment
{
  "local_name": "make-promises-safe",
  "alias": false,
  "peer_metadata": null
}
^1.1.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "7c9183e6e725fa32fb81a7de0e371917cf64251a",
  "tarball": "https://registry.npmjs.org/@0x/utils/-/utils-6.3.0.tgz",
  "fileCount": 305,
  "integrity": "sha512-I3eIvEYnKVsXDQv7dKRBHxRg9a4thDxmvGTEeT9wCsodjaHn5tTYmrkkfUiKFPQ8HEvdenTasPAPI2Y83rMdzA==",
  "signatures": [
    {
      "sig": "MEUCIQCD3L3gOVze7ynjbwm39BwOuwdljDC6bFnGn6fuepC7FwIgahWcqXzV7ljkvZHb/dcBlDH/R9yRzP9OKdSsjp/oc58=",
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"
    }
  ],
  "unpackedSize": 532171,
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbMGiCRA9TVsSAnZWagAAAF8P/jLKLaGOj7UD0OtpqAOg\nixh80HzvAuivl9jkfGUyEwTFOZ9/ZHYiCgt69QCOztMkicYYOMxmlgoQiyi7\nru/RnL4QzSEtO8mI2qV88vrNU5hRpDSGplC5XeuGd90VlJds5Fw1lwCqaoCp\nXZZgwECpVcU3OSbIxefbOL42fmgwWlopcReHuKWs2sPPsgUB7mu2BWMPR9AV\nG7fVFsj2UP0TKs1YOUUkUT2Ups7vG6atIWC6AkjhA2Z/e1f3I/AqtBiamX2R\nsVI4CwBwmofZPPR9FNuZHCPUcxgHhJ9ZUj+Shd9Xupa0JV7gxLy+tS5yKAqd\npp4QeJljozBYpAjVH+8HLePxnP1YaTp9RADFOmiYT7dpBz/Z3wR2m+tquwBZ\n9YcQRdpIb02Qgm7ZoR665qr7R0D5tyBCtJ0HfHcYazb7KM79FnsGPGX/a4xm\nUulRhD6DLcUAp2jOrX2txRlAnrAQnt3Ng/KSO9Mj6m2LOpgQBZZ1SDA9VQlV\n2WB7531cCoG57lQWt6zxj8SIPTBxawCL90ZcZElZie6/lVRDptfCnBWHlLjj\nmv28z14R4oYlnadiY39LefxJA/9st0DNfTu/hGsrNPT2HVewaT0zMu/erqAw\nNFx0BxYdXjyxdvT04tp8kZiYhXUARV4WgyrRHs9sVwaQhyadv5irUMiLztjm\npJCU\r\n=hoJE\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
0xproject/0x-monorepo

Shared repository data · GitHub

License detected in repository
Not collected

Repository

PENDING
0xproject/tools

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:aa72de95c19f78f5ba5740c19efe49b2231bc6b60fb2f8bfe1f9f7957ed44eaa

Other collected versions

7.0.018 Aug6.5.316 Mar6.5.216 Mar6.5.126 Feb6.5.019 Jan6.4.425 AugView all collected versions →