react-hook-currency
Version:
> This libraries propose to introduce two pseudo hooks, one capable of format currencies and another capable to simulate a cash register.
12 lines (11 loc) • 802 B
TypeScript
import { Locales } from '../constants';
export declare function removeNonNumerics(raw: string): string;
export declare function removeNonNumericsExceptDash(raw: string): string;
export declare function removeNonRegister(raw: string, decimalSeparator?: string): string;
export declare function getOperators(raw: string): string[];
export declare function getNumbers(raw: string, decimalSeparator: string): string[];
export declare function hasDash(raw: string): "" | "-";
export declare function getDecimalSeparator(locale: Locales | string): string;
export declare function calculator(num1: string, num2: string, operator: string, decimalSeparator: string): any;
export declare function replaceAllCalc(value: string): string;
export declare function replaceAllNoCalc(value: string): string;