Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@castlenine/utility-belt

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@castlenine/utility-belt - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

2

dist/index.d.ts
export { convertNumberToAtomicUnit, convertAtomicUnitToBigNumber } from './utils/atomic-unit';
export { parseValueFromCookie } from './utils/cookie';
export { cryptoMinusShiftedToBigNumberType, cryptoShiftedToBigNumberType } from './utils/cryptocurrency';
export { getCurrencyFullName, getCurrencySymbol, formatAndAddCurrencySymbol, labelCurrency } from './utils/currency';
export { currencyExistsInIntl, getCurrencyFullName, getCurrencySymbol, formatAndAddCurrencySymbol, labelCurrency, } from './utils/currency';
export { default as delay } from './utils/delay';

@@ -6,0 +6,0 @@ export { isEmailValid } from './utils/email';

@@ -33,10 +33,10 @@ import * as atomicUnit from './utils/atomic-unit';

convertDateToLocalTime: (date: import("dayjs").ConfigType) => string;
capitalizeFirstLetterOnly: (string: string, isRestBecomeLowercase?: boolean) => string;
replaceLastCommaByDot: (string: string, removeTheExtraCommas?: boolean) => string;
isStringContainsNumber: (string: string) => boolean;
removeNonNumericCharactersFromString: (string: string, haveReplaceLastCommaByDot?: boolean) => string;
removeNumbersFromString: (string: string) => string;
capitalizeFirstLetterOnly: (string: string | undefined, isRestBecomeLowercase?: boolean) => string;
replaceLastCommaByDot: (string: string | undefined, removeTheExtraCommas?: boolean) => string;
isStringContainsNumber: (string: string | undefined) => boolean;
removeNonNumericCharactersFromString: (string: string | undefined, haveReplaceLastCommaByDot?: boolean) => string;
removeNumbersFromString: (string: string | undefined) => string;
numberToString: (number: number | import("bignumber.js").BigNumber | undefined) => string;
normalizeString: (string: string, spaceReplacementType?: "remove" | "underscore" | "dash" | "", haveRemoveDiacritic?: boolean, haveRemoveEmoji?: boolean, haveRemoveNonLatin?: boolean, haveRemoveNumber?: boolean, haveRemovePunctuation?: boolean, haveRemoveSpecialCharacters?: boolean) => string;
slugifyString: (string: string, isBecomeLowercase?: boolean) => string;
normalizeString: (string: string | undefined, spaceReplacementType?: "remove" | "underscore" | "dash" | "", haveRemoveDiacritic?: boolean, haveRemoveEmoji?: boolean, haveRemoveNonLatin?: boolean, haveRemoveNumber?: boolean, haveRemovePunctuation?: boolean, haveRemoveSpecialCharacters?: boolean) => string;
slugifyString: (string: string | undefined, isBecomeLowercase?: boolean) => string;
isObjectEmpty: (object: object | null | undefined) => boolean;

@@ -51,3 +51,3 @@ countValueInArrayOfObjects: (arrayOfObjectsToCount: Array<Record<string, unknown>>, keyName: string, valueToCount: unknown) => number;

roundDownNumberToBigNumber: (number: number | string | import("bignumber.js").BigNumber | undefined, decimal?: number) => import("bignumber.js").BigNumber;
formatNumber: (number: number | string | import("bignumber.js").BigNumber | undefined, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
formatNumber: (number: number | string | import("bignumber.js").BigNumber | undefined, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, localeFormat?: string) => string;
countDecimalPlaces: (number: number | string | import("bignumber.js").BigNumber | undefined) => number;

@@ -57,6 +57,7 @@ labelNumber: (number: number | string | import("bignumber.js").BigNumber | undefined, lang?: Locales, shortLabel?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;

delay: (milliseconds: number) => Promise<void>;
currencyExistsInIntl: (currency: string, lang?: string) => boolean;
getCurrencyFullName: (currency: Currency, lang?: Locales, plural?: boolean) => string;
getCurrencySymbol: (currency: Currency) => string;
formatAndAddCurrencySymbol: (amount: string | number | import("bignumber.js").BigNumber | undefined, currency?: Currency, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, useIsoCurrencyCode?: boolean, haveShortSymbol?: boolean) => string;
labelCurrency: (amount: string | number | import("bignumber.js").BigNumber | undefined, lang?: Locales, currency?: Currency, shortLabel?: boolean, haveCurrencyText?: boolean, haveShortCurrencySymbol?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
getCurrencySymbol: (currency: Currency, isNarrowSymbol?: boolean, localeFormat?: string) => string;
formatAndAddCurrencySymbol: (amount: string | number | import("bignumber.js").BigNumber | undefined, currency?: Currency, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, currencyDisplay?: "code" | "narrowSymbol" | "symbol", localeFormat?: string) => string;
labelCurrency: (amount: string | number | import("bignumber.js").BigNumber | undefined, lang?: Locales, currency?: Currency, currencyDisplay?: "code" | "narrowSymbol" | "symbol" | "name" | "none", shortLabel?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
cryptoMinusShiftedToBigNumberType: (amount: number | import("bignumber.js").BigNumber | string | undefined, shiftFactor?: number) => import("bignumber.js").BigNumber;

@@ -63,0 +64,0 @@ cryptoShiftedToBigNumberType: (amount: number | import("bignumber.js").BigNumber | string | undefined, shiftFactor?: number) => import("bignumber.js").BigNumber;

import BigNumber from 'bignumber.js';
/**
* Checks if a given currency code exists in Intl.DisplayNames.
*
* @param currency - The currency code to check.
* @param lang - The language code for localization.
*
* @returns True if the currency exists, false otherwise.
*/
declare const currencyExistsInIntl: (currency: string, lang?: string) => boolean;
declare const getCurrencyFullName: (currency: Currency, lang?: Locales, plural?: boolean) => string;
declare const getCurrencySymbol: (currency: Currency) => string;
declare const formatAndAddCurrencySymbol: (amount: string | number | BigNumber | undefined, currency?: Currency, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, useIsoCurrencyCode?: boolean, haveShortSymbol?: boolean) => string;
declare const labelCurrency: (amount: string | number | BigNumber | undefined, lang?: Locales, currency?: Currency, shortLabel?: boolean, haveCurrencyText?: boolean, haveShortCurrencySymbol?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
export { getCurrencyFullName, getCurrencySymbol, formatAndAddCurrencySymbol, labelCurrency };
declare const getCurrencySymbol: (currency: Currency, isNarrowSymbol?: boolean, localeFormat?: string) => string;
declare const formatAndAddCurrencySymbol: (amount: string | number | BigNumber | undefined, currency?: Currency, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, currencyDisplay?: "code" | "narrowSymbol" | "symbol", localeFormat?: string) => string;
declare const labelCurrency: (amount: string | number | BigNumber | undefined, lang?: Locales, currency?: Currency, currencyDisplay?: "code" | "narrowSymbol" | "symbol" | "name" | "none", shortLabel?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
export { currencyExistsInIntl, getCurrencyFullName, getCurrencySymbol, formatAndAddCurrencySymbol, labelCurrency };
//# sourceMappingURL=currency.d.ts.map

@@ -9,3 +9,3 @@ import BigNumber from 'bignumber.js';

declare const roundDownNumberToBigNumber: (number: number | string | BigNumber | undefined, decimal?: number) => BigNumber;
declare const formatNumber: (number: number | string | BigNumber | undefined, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;
declare const formatNumber: (number: number | string | BigNumber | undefined, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number, localeFormat?: string) => string;
declare const countDecimalPlaces: (number: number | string | BigNumber | undefined) => number;

@@ -12,0 +12,0 @@ declare const labelNumber: (number: number | string | BigNumber | undefined, lang?: Locales, shortLabel?: boolean, isRounded?: boolean, maximumDecimal?: number, minimumDecimal?: number) => string;

import BigNumber from 'bignumber.js';
declare const capitalizeFirstLetterOnly: (string: string, isRestBecomeLowercase?: boolean) => string;
declare const replaceLastCommaByDot: (string: string, removeTheExtraCommas?: boolean) => string;
declare const isStringContainsNumber: (string: string) => boolean;
declare const removeNonNumericCharactersFromString: (string: string, haveReplaceLastCommaByDot?: boolean) => string;
declare const removeNumbersFromString: (string: string) => string;
declare const capitalizeFirstLetterOnly: (string: string | undefined, isRestBecomeLowercase?: boolean) => string;
declare const replaceLastCommaByDot: (string: string | undefined, removeTheExtraCommas?: boolean) => string;
declare const isStringContainsNumber: (string: string | undefined) => boolean;
declare const removeNonNumericCharactersFromString: (string: string | undefined, haveReplaceLastCommaByDot?: boolean) => string;
declare const removeNumbersFromString: (string: string | undefined) => string;
declare const numberToString: (number: number | BigNumber | undefined) => string;
declare const normalizeString: (string: string, spaceReplacementType?: "remove" | "underscore" | "dash" | "", haveRemoveDiacritic?: boolean, haveRemoveEmoji?: boolean, haveRemoveNonLatin?: boolean, haveRemoveNumber?: boolean, haveRemovePunctuation?: boolean, haveRemoveSpecialCharacters?: boolean) => string;
declare const slugifyString: (string: string, isBecomeLowercase?: boolean) => string;
declare const normalizeString: (string: string | undefined, spaceReplacementType?: "remove" | "underscore" | "dash" | "", haveRemoveDiacritic?: boolean, haveRemoveEmoji?: boolean, haveRemoveNonLatin?: boolean, haveRemoveNumber?: boolean, haveRemovePunctuation?: boolean, haveRemoveSpecialCharacters?: boolean) => string;
declare const slugifyString: (string: string | undefined, isBecomeLowercase?: boolean) => string;
export { capitalizeFirstLetterOnly, replaceLastCommaByDot, isStringContainsNumber, removeNonNumericCharactersFromString, removeNumbersFromString, numberToString, normalizeString, slugifyString, };
//# sourceMappingURL=string.d.ts.map
{
"name": "@castlenine/utility-belt",
"version": "0.0.5",
"version": "0.0.6",
"description": "Utility Belt is a versatile and lightweight collection of essential JavaScript utilities designed to streamline and simplify my development workflow",

@@ -64,5 +64,5 @@ "license": "MIT",

"@rollup/plugin-typescript": "^11.1.6",
"@types/node": "^20.14.11",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@typescript-eslint/parser": "^7.16.1",
"@types/node": "^20.14.12",
"@typescript-eslint/eslint-plugin": "^7.17.0",
"@typescript-eslint/parser": "^7.17.0",
"@vitest/coverage-istanbul": "^2.0.4",

@@ -91,3 +91,3 @@ "commitizen": "^4.3.0",

"tslib": "^2.6.3",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"vitest": "^2.0.4"

@@ -94,0 +94,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc