🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@types/jquery-mask-plugin

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/jquery-mask-plugin

TypeScript definitions for jquery-mask-plugin

1.14.6
ts4.5
ts4.6
ts4.7
ts4.8
ts4.9
ts5.0
ts5.1
ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
latest
Source
npm
Version published
Weekly downloads
6.3K
-24.11%
Maintainers
1
Weekly downloads
 
Created
Source

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

/// <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

Credits

These definitions were written by Anže Videnič, Igor Escobar, and Anderson Friaça.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts