1.0.0 • Published 11 months ago

@jetstreamgg/sky-utils v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Sky Ecosystem - Utils

Installation

npm install @jetstreamgg/sky-utils

Documentation

import { getEtherscanLink } from '@jetstreamgg/sky-utils';

const link = getEtherscanLink(chainId, contractAddress, 'address');

I18n

Some functions in the package support internationalization, like the number formatting functions. To make use of this feature, you can pass the locale string to the functions like so:

let amountToFormat: BigInt;
const locale = 'fr-FR';

const formattedAmount = formatBigInt(amountToFormat, { locale });

Or you can use the setLocaleInLocaleStorage(locale) function in this package to store a locale string in the LocalStorage, the other functions would then look for the locale in the LocalStorage, defaulting to en-US if none is found.