ngx-useful-libs
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

NgxUsefulLibs

🎉 useful and practical Directives and Pipes for Angular projects

📦Demo

🚀demo

Install

  • NPM: npm i ngx-useful-libs
  • YARN: yarn add ngx-useful-libs

Usage

Import NgxUsefulLibsModule to your working module

import { NgxUsefulLibsModule } from  'ngx-useful-libs';

@NgModule({
  imports: [
    NgxUsefulLibsModule 
  ]
})
export class AppModule { }

To use this library, see the demo link

📦Directive

  • OnlyDecimals
  • OnlyNumbers

directive to force the user to enter numbers.

Advantage of using this directive The possibility of using input with text type with [maxlength], [minlength], [max], [min] attribute And convert Persian and Arabic numerals to English numerals As well as a thousand separators

📦Pipe

  • sort

Sort array of objects with pipe

  • random

Random numbers or arrays of objects

  • secondToTime

Convert second to time string like this: 879456123 => 21:22:03

  • numberToPersianString

Convert number to persian characters

📦FormValidator

  • checkNationalCode

Check iranian national code

  • checkMobileNumber

Check iranian mobile number

  • checkPhoneNumber

Check phone number start with zero

  • checkNumberCharacters

Only use number

  • checkPersianCharacters

Only use persian characters

  • checkEnglishCharacters

Only use english characters

  • checkEnglishAndNumberCharacters

Only use english characters with numbers

  • notStartWithNumber

Do not start with numbers

  • checkEmail

Check email address

Author

💻Mohammadreza samani | FrontEnd Developer

❤️Buy me a coffee 😉

Package Sidebar

Install

npm i ngx-useful-libs

Weekly Downloads

5

Version

1.1.0

License

ISC

Unpacked Size

267 kB

Total Files

30

Last publish

Collaborators

  • mr-samani