0.0.3 • Published 2 years ago

essential-cosmos v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

  • 🏎 The TINIEST code size possible
  • ĘŚ Fully typed with TypeScript (also works with JavaScript)
  • 🌲 Tree-shaking and no side-effects
  • 🙌 Supports multiple JS versions (CommonJS and ESM)
    • ✅ Node 14, 12, & 10
    • ✅ Web

More Info

npm.io npm.io npm.io npm.io

Install

npm install --save essential-cosmos # TypeScript types load automatically

# or if you prefer yarn
yarn add essential-cosmos # TypeScript types load automatically

Utils (do not require connecting to a node)

import { isCosmosAddress } from 'essential-cosmos';

// or in a commonJS environment
const { isCosmosAddress } = require('essential-cosmos');

isCosmosAddress

Returns a boolean

isCosmosAddress(address:string): Boolean
import { isCosmosAddress } from 'essential-cosmos';

isCosmosAddress('cosmos15hmqrc245kryaehxlch7scl9d9znxa58qkpjet');
// true

isCosmosAddress('osmo100a325n9ct4m2egvctrh48zheg2hwl5lr26rzy');
// false