Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
angular1-text-mask
Advanced tools
Readme
First, install it.
npm i angular1-text-mask --save
Then, use it as follows:
<script
type="text/javascript"
src="./node_modules/angular1-text-mask/dist/angular1TextMask.js"></script>
<script type="text/javascript">
// First add Text Mask as a module
angular
.module('app', ['text-mask'])
// Then use it in your Angular1 component as such
.component('app', {
controller: 'DemoController as $ctrl',
template: '<input text-mask="$ctrl.textMaskConfig" ng-model="$ctrl.myModel" type="text"/>'
})
.controller(function() {
var vm = this
this.myModel = ''
this.modelWithValue = '5554441234'
this.textMaskConfig = {
mask: ['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]
}
})
</script>
As you can see in the code above, you are passing an object to the text-mask
directive.
For more information about the values that the text-mask
object accepts, see
this page.
To see an example of a minimal app running with this directive, follow these steps:
git clone git@github.com:text-mask/text-mask.git
cd text-mask
npm install
npm run angular1:dev
The code of the example is in angular1/example
.
FAQs
Angular 1 directive for input text masking
The npm package angular1-text-mask receives a total of 762 weekly downloads. As such, angular1-text-mask popularity was classified as not popular.
We found that angular1-text-mask demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.