New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-text-mask

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-text-mask

Ember input component that accepts mask pattern

  • 6.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
294
decreased by-43.24%
Maintainers
2
Weekly downloads
 
Created
Source

Ember Input Mask

Getting started

First, install it.

ember install ember-text-mask

Then, use it as follows:

Add the following markup to your template to render a masked input component.

{{masked-input mask=mask}}

In the template's controller, specify a mask.

import Controller from '@ember/controller';

export default Controller.extend({

  mask: ['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]

});

Documentation

📍 For more information about the attributes that the masked-input component accepts, see the documentation here.

Other use-cases
Unmasking the value that is stored in the model

Text Mask does not provide an option to unmask the model before storing it. You can sanitize the model on your side. See here for details.

Example

To see an example of the code running, follow these steps:

  • Clone the repo, git clone git@github.com:text-mask/text-mask.git
  • cd text-mask/ember
  • npm install
  • bower install
  • ember serve
  • Open http://localhost:4200

You should have a working demo.

Keywords

FAQs

Package last updated on 27 Apr 2018

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

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