JSPM

@polkadot/util

8.2.3-5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 198792
  • Score
    100M100P100Q168495F
  • License Apache-2.0

A collection of useful utilities for @polkadot

Package Exports

  • @polkadot/util
  • @polkadot/util/array
  • @polkadot/util/array/chunk
  • @polkadot/util/array/filter
  • @polkadot/util/array/flatten
  • @polkadot/util/array/range
  • @polkadot/util/array/shuffle
  • @polkadot/util/array/zip
  • @polkadot/util/assert
  • @polkadot/util/bi
  • @polkadot/util/bi/consts
  • @polkadot/util/bi/min
  • @polkadot/util/bi/sqrt
  • @polkadot/util/bi/toBigInt
  • @polkadot/util/bi/toHex
  • @polkadot/util/bi/toU8a
  • @polkadot/util/bn
  • @polkadot/util/bn/bn
  • @polkadot/util/bn/consts
  • @polkadot/util/bn/fromHex
  • @polkadot/util/bn/min
  • @polkadot/util/bn/sqrt
  • @polkadot/util/bn/toBn
  • @polkadot/util/bn/toHex
  • @polkadot/util/bn/toU8a
  • @polkadot/util/buffer
  • @polkadot/util/buffer/toU8a
  • @polkadot/util/bundle
  • @polkadot/util/compact
  • @polkadot/util/compact/addLength
  • @polkadot/util/compact/defaults
  • @polkadot/util/compact/fromU8a
  • @polkadot/util/compact/stripLength
  • @polkadot/util/compact/toU8a
  • @polkadot/util/compact/types
  • @polkadot/util/detectPackage
  • @polkadot/util/extractTime
  • @polkadot/util/format
  • @polkadot/util/format/formatBalance
  • @polkadot/util/format/formatDate
  • @polkadot/util/format/formatDecimal
  • @polkadot/util/format/formatElapsed
  • @polkadot/util/format/formatNumber
  • @polkadot/util/format/si
  • @polkadot/util/has
  • @polkadot/util/hex
  • @polkadot/util/hex/addPrefix
  • @polkadot/util/hex/alphabet
  • @polkadot/util/hex/fixLength
  • @polkadot/util/hex/hasPrefix
  • @polkadot/util/hex/stripPrefix
  • @polkadot/util/hex/toBigInt
  • @polkadot/util/hex/toBn
  • @polkadot/util/hex/toNumber
  • @polkadot/util/hex/toString
  • @polkadot/util/hex/toU8a
  • @polkadot/util/hex/toU8aBuffer
  • @polkadot/util/is
  • @polkadot/util/is/array
  • @polkadot/util/is/ascii
  • @polkadot/util/is/bigInt
  • @polkadot/util/is/bn
  • @polkadot/util/is/boolean
  • @polkadot/util/is/buffer
  • @polkadot/util/is/childClass
  • @polkadot/util/is/codec
  • @polkadot/util/is/compact
  • @polkadot/util/is/error
  • @polkadot/util/is/function
  • @polkadot/util/is/helpers
  • @polkadot/util/is/hex
  • @polkadot/util/is/instanceOf
  • @polkadot/util/is/ip
  • @polkadot/util/is/jsonObject
  • @polkadot/util/is/null
  • @polkadot/util/is/number
  • @polkadot/util/is/object
  • @polkadot/util/is/observable
  • @polkadot/util/is/promise
  • @polkadot/util/is/string
  • @polkadot/util/is/testChain
  • @polkadot/util/is/toBigInt
  • @polkadot/util/is/toBn
  • @polkadot/util/is/u8a
  • @polkadot/util/is/undefined
  • @polkadot/util/is/utf8
  • @polkadot/util/is/wasm
  • @polkadot/util/lazy
  • @polkadot/util/logger
  • @polkadot/util/memoize
  • @polkadot/util/number
  • @polkadot/util/number/toHex
  • @polkadot/util/number/toU8a
  • @polkadot/util/object
  • @polkadot/util/object/clear
  • @polkadot/util/object/copy
  • @polkadot/util/object/entries
  • @polkadot/util/object/keys
  • @polkadot/util/object/property
  • @polkadot/util/object/spread
  • @polkadot/util/object/values
  • @polkadot/util/package.json
  • @polkadot/util/packageInfo
  • @polkadot/util/promisify
  • @polkadot/util/string
  • @polkadot/util/string/camelCase
  • @polkadot/util/string/lowerFirst
  • @polkadot/util/string/shorten
  • @polkadot/util/string/toHex
  • @polkadot/util/string/toU8a
  • @polkadot/util/stringify
  • @polkadot/util/types
  • @polkadot/util/u8a
  • @polkadot/util/u8a/cmp
  • @polkadot/util/u8a/concat
  • @polkadot/util/u8a/concatBuffer
  • @polkadot/util/u8a/empty
  • @polkadot/util/u8a/eq
  • @polkadot/util/u8a/fixLength
  • @polkadot/util/u8a/sorted
  • @polkadot/util/u8a/toBigInt
  • @polkadot/util/u8a/toBn
  • @polkadot/util/u8a/toBuffer
  • @polkadot/util/u8a/toHex
  • @polkadot/util/u8a/toHexBuffer
  • @polkadot/util/u8a/toString
  • @polkadot/util/u8a/toU8a
  • @polkadot/util/u8a/wrap
  • @polkadot/util/versionDetect

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';