JSPM

@polkadot/util

3.1.0-beta.7
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 198792
  • Score
    100M100P100Q168476F
  • License Apache-2.0

A collection of useful utilities for @polkadot

Package Exports

  • @polkadot/util
  • @polkadot/util/array/filter
  • @polkadot/util/assert
  • @polkadot/util/bn/toBn
  • @polkadot/util/bn/toHex
  • @polkadot/util/bn/toU8a
  • @polkadot/util/buffer/toU8a
  • @polkadot/util/compact/defaults
  • @polkadot/util/hex
  • @polkadot/util/hex/addPrefix
  • @polkadot/util/hex/fixLength
  • @polkadot/util/hex/hasPrefix
  • @polkadot/util/hex/stripPrefix
  • @polkadot/util/hex/toBn
  • @polkadot/util/hex/toU8a
  • @polkadot/util/index
  • @polkadot/util/is
  • @polkadot/util/is/bn
  • @polkadot/util/is/boolean
  • @polkadot/util/is/buffer
  • @polkadot/util/is/error
  • @polkadot/util/is/function
  • @polkadot/util/is/hex
  • @polkadot/util/is/instanceOf
  • @polkadot/util/is/ip
  • @polkadot/util/is/null
  • @polkadot/util/is/number
  • @polkadot/util/is/object
  • @polkadot/util/is/observable
  • @polkadot/util/is/string
  • @polkadot/util/is/u8a
  • @polkadot/util/is/undefined
  • @polkadot/util/logger
  • @polkadot/util/number/toHex
  • @polkadot/util/number/toU8a
  • @polkadot/util/polyfill
  • @polkadot/util/promisify
  • @polkadot/util/string
  • @polkadot/util/string/shorten
  • @polkadot/util/string/toU8a
  • @polkadot/util/u8a
  • @polkadot/util/u8a/concat
  • @polkadot/util/u8a/fixLength
  • @polkadot/util/u8a/toBn
  • @polkadot/util/u8a/toBuffer
  • @polkadot/util/u8a/toHex
  • @polkadot/util/u8a/toString
  • @polkadot/util/u8a/toU8a

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polkadot/util) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@polkadot/util

Various useful utility functions that are used across all projects in the @polkadot namespace. It provides utility functions with additional safety checks, allowing not only for consistent coding, but also reducing the general boilerplate.

Usage

Installation -

yarn add @polkadot/util

Functions can be imported directly from the package, e.g.

import { isHex } from '@polkadot/util';

Utilities

Utilities