Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-mask

Package Overview
Dependencies
Maintainers
1
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-mask - npm Package Compare versions

Comparing version 14.2.4 to 15.0.0

esm2020/lib/ngx-mask-applier.service.mjs

10

index.d.ts

@@ -1,7 +0,7 @@

export * from './lib/ngx-mask.module';
export * from './lib/mask.directive';
export * from './lib/mask.pipe';
export * from './lib/mask.service';
export * from './lib/mask-applier.service';
export * from './lib/ngx-mask.providers';
export * from './lib/ngx-mask.directive';
export * from './lib/ngx-mask.pipe';
export * from './lib/ngx-mask.service';
export * from './lib/ngx-mask-applier.service';
export * from './lib/config';
export * from './lib/custom-keyboard-event';

@@ -30,3 +30,3 @@ import { InjectionToken, EventEmitter } from '@angular/core';

export declare type optionsConfig = Partial<IConfig>;
export declare const config: InjectionToken<IConfig>;
export declare const CONFIG: InjectionToken<IConfig>;
export declare const NEW_CONFIG: InjectionToken<IConfig>;

@@ -33,0 +33,0 @@ export declare const INITIAL_CONFIG: InjectionToken<IConfig>;

{
"name": "ngx-mask",
"version": "14.2.4",
"version": "15.0.0",
"description": "awesome ngx mask",

@@ -31,5 +31,5 @@ "keywords": [

"peerDependencies": {
"@angular/common": ">=10.0.0",
"@angular/core": ">=10.0.0",
"@angular/forms": ">=10.0.0"
"@angular/common": ">=14.0.0",
"@angular/core": ">=14.0.0",
"@angular/forms": ">=14.0.0"
},

@@ -36,0 +36,0 @@ "dependencies": {

@@ -26,4 +26,60 @@ <a href="https://jsdaddy.github.io/ngx-mask">

## Quickstart
## Quickstart if ngx-mask version >= 15.0.0
Import **ngx-mask** directive, pipe and provide NgxMask providers with `provideNgxMask` function.
### With default mask config options
```typescript
import { NgxMaskDirective, NgxMaskPipe, provideNgxMask, IConfig } from 'ngx-mask'
export const options: Partial<null|IConfig> | (() => Partial<IConfig>) = null;
@NgModule({
imports: [
NgxMaskDirective, NgxMaskPipe
],
providers: [provideNgxMask()]
})
```
### Passing in your own mask config options
```typescript
import { NgxMaskModule, IConfig } from 'ngx-mask'
const maskConfig: Partial<IConfig> = {
validation: false,
};
@NgModule({
imports: [
NgxMaskDirective, NgxMaskPipe
],
providers: [provideNgxMask(maskConfig)]
})
```
Or using a function to get the config:
```typescript
const maskConfigFunction: () => Partial<IConfig> = () => {
return {
validation: false,
};
};
@NgModule({
imports: [
NgxMaskDirective, NgxMaskPipe
],
providers: [provideNgxMask(maskConfigFunction)]
})
```
Then, just define masks in inputs.
## Quickstart if ngx-mask version < 15.0.0
For version ngx-mask < 15.0.0
Import **ngx-mask** module in Angular app.

@@ -79,3 +135,3 @@

### Usage
## Usage

@@ -94,4 +150,2 @@ ```html

### Usage
```html

@@ -103,4 +157,2 @@ <span>{{phone | mask: '(000) 000-0000'}}</span>

### Usage
```html

@@ -110,3 +162,3 @@ <span>{{value | mask: 'separator':','}}</span>

#### Examples
### Examples

@@ -113,0 +165,0 @@ | mask | example |

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc