# @types/jquery-mask-plugin

> TypeScript definitions for jquery-mask-plugin

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

## Install

```sh
npm install @types/jquery-mask-plugin
pnpm add @types/jquery-mask-plugin
yarn add @types/jquery-mask-plugin
bun add @types/jquery-mask-plugin
```

## 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.14.6 |
| Published | 2023-11-07 |
| First published | 2017-01-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51432 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/jquery](https://npm.io/package/@types/jquery.md) *

## Recent versions

- 1.14.6 (latest) — 2023-11-07
- 1.14.4 (ts3.6) — 2021-07-08
- 1.14.3 (ts2.3) — 2018-01-31
- 1.14.1 (ts2.0) — 2017-03-24
- 1.14.5 — 2023-10-18
- 1.14.2 — 2017-06-15
- 1.14.0 — 2017-01-04

## README

# Installation
> `npm install --save @types/jquery-mask-plugin`

# Summary
This package contains type definitions for jquery-mask-plugin (https://igorescobar.github.io/jQuery-Mask-Plugin/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery-mask-plugin.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery-mask-plugin/index.d.ts)
````ts
/// <reference types="jquery" />

declare namespace jQueryMask {
    interface Invalid {
        p: number;
        v: string;
        e: string;
    }

    interface Options {
        maskElements?: string | undefined;
        dataMaskAttr?: string | undefined;
        dataMask?: boolean | undefined;
        watchInterval?: number | undefined;
        watchInputs?: boolean | undefined;
        watchDataMask?: boolean | undefined;
        byPassKeys?: number[] | undefined;
        translation?: Translation | undefined;
        selectOnFocus?: boolean | undefined;
        reverse?: boolean | undefined;
        clearIfNotMatch?: boolean | undefined;
        placeholder?: string | undefined;
        onComplete?(value: string, e: Event, $element: JQuery, options: Options): void;
        onKeyPress?(value: string, e: Event, $element: JQuery, options: Options): void;
        onChange?(value: string, e: Event, $element: JQuery, options: Options): void;
        onInvalid?(value: string, e: Event, $element: JQuery, invalid: Invalid[], options: Options): void;
    }

    interface Pattern {
        pattern?: RegExp | undefined;
        recursive?: boolean | undefined;
        optional?: boolean | undefined;
        fallback?: string | undefined;
    }

    interface Translation {
        [key: string]: Pattern | {} | undefined;
        placeholder?: string | undefined;
    }
}

interface JQuery {
    /**
     * Applies the mask to the matching selector elements.
     * @param mask should be a string or a function.
     * @param options should be an options object.
     * @returns The element.
     */
    mask(mask: ((value: string) => string) | string, options?: jQueryMask.Options): JQuery;

    /**
     * Seek and destroy.
     * @returns The element.
     */
    unmask(): JQuery;

    /**
     * Gets the value of the field without the mask.
     * @returns Value without the mask.
     */
    cleanVal(): string;

    /**
     * Gets masked value programmatically
     * @returns Masked value.
     */
    masked(value: string): string;
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/jquery](https://npmjs.com/package/@types/jquery)

# Credits
These definitions were written by [Anže Videnič](https://github.com/avidenic), [Igor Escobar](http://www.igorescobar.com/), and [Anderson Friaça](https://github.com/AndersonFriaca).

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