JSPM

@polkadot/util

0.26.15
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 198792
  • Score
    100M100P100Q168477F
  • License ISC

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/ext/error
  • @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/promisify
  • @polkadot/util/string
  • @polkadot/util/string/shorten
  • @polkadot/util/syncify
  • @polkadot/util/u8a
  • @polkadot/util/u8a/concat
  • @polkadot/util/u8a/fixLength
  • @polkadot/util/u8a/fromString
  • @polkadot/util/u8a/fromUtf8
  • @polkadot/util/u8a/toBn
  • @polkadot/util/u8a/toBuffer
  • @polkadot/util/u8a/toHex
  • @polkadot/util/u8a/toString
  • @polkadot/util/u8a/toU8a
  • @polkadot/util/u8a/toUtf8

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

polkadotjs isc style npm travis maintainability coverage dependency devDependency

@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 -

npm install --save @polkadot/util

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

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

Alternatively the function can be accessed directly,

import isHex from '@polkadot/util/is/hex';

Available Utilities

For a list of currently exposed methods, see the library documentation.