1.2.4 • Published 6 months ago
@types/vanilla-masker v1.2.4
Installation
npm install --save @types/vanilla-masker
Summary
This package contains type definitions for vanilla-masker (https://fleury.io/vanilla-masker/).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vanilla-masker.
index.d.ts
// Type definitions for vanilla-masker 1.2
// Project: https://fleury.io/vanilla-masker/
// Definitions by: BenLorantfy <https://github.com/BenLorantfy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface MoneyOptions {
// Decimal precision -> "90"
precision?: number | undefined;
// Decimal separator -> ",90"
separator?: string | undefined;
// Number delimiter -> "12.345.678"
delimiter?: string | undefined;
// Money unit -> "R$ 12.345.678,90"
unit?: string | undefined;
// Money unit -> "12.345.678,90 R$"
suffixUnit?: string | undefined;
// Force type only number instead decimal,
// masking decimals with ",00"
// Zero cents -> "R$ 1.234.567.890,00"
zeroCents?: boolean | undefined;
}
interface PatternOptions {
// Pattern to mask value against.
pattern?: string | undefined;
// Placeholder option to represent remaining characters to be entered
placeholder?: string | undefined;
}
declare const VMasker: {
(el: Element|NodeListOf<Element>): {
maskMoney: (options?: MoneyOptions) => void;
maskNumber: () => void;
maskAlphaNum: () => void;
maskPattern: (pattern: string) => void;
unMask: () => void;
}
toMoney: (value: string|number, options?: MoneyOptions) => string;
toPattern: (value: string|number, options?: string|PatternOptions) => string;
toNumber: (value: string|number) => string;
toAlphaNumeric: (value: string|number) => string;
};
export = VMasker;
Additional Details
- Last updated: Fri, 02 Jul 2021 18:05:00 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by BenLorantfy.