# @types/vanilla-masker

> TypeScript definitions for vanilla-masker

Latest version **1.2.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/vanilla-masker
pnpm add @types/vanilla-masker
yarn add @types/vanilla-masker
bun add @types/vanilla-masker
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.4 |
| Published | 2023-11-07 |
| First published | 2019-06-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51482 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/vanilla-masker
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vanilla-masker
- npm.io page: https://npm.io/package/@types/vanilla-masker

## Recent versions

- 1.2.4 (latest) — 2023-11-07
- 1.2.1 (ts3.6) — 2021-07-02
- 1.2.0 (ts2.0) — 2019-06-12
- 1.2.3 — 2023-10-18
- 1.2.2 — 2023-09-26

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vanilla-masker/index.d.ts)
````ts
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: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [BenLorantfy](https://github.com/BenLorantfy).

---
_Source: https://npm.io/package/@types/vanilla-masker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
