@webilix/helper-library
v6.0.2
Published
JavaScript/TypeScript programming helper library.
Downloads
327
Readme
@webilix/helper-library
JavaScript/TypeScript helper library.
Table of contents
Regular Expressions
Validators
Helpers
- Bank Helpers
- Color Helpers
- Date Helpers
- Geo Helpers
- Number Helpers
- Password Helpers
- Plate Helpers
- State Helpers
- String Helpers
- Time Helpers
Unit Helpers
Installation
npm install --save @webilix/helper-library
Usage
import { Helper } from '@webilix/helper-library';
Helper.NUMBER.format(100000);
// ۱۰۰,۰۰۰
Helper.NUMBER.format(100000, 'EN');
// 100,000
Tests
git clone https://github.com/webilix/helper-library.git
npm install
npm test
Regular Expressions
Regular Expression Types
Helper.RE.
- DATE
- DOMAIN
- HEX_COLOR
- HSL_COLOR
- IP4
- JSON_DATE
- MOBILE
- NUMERIC
- PASSWORD
- RGB_COLOR
- TIME
- URL
- USERNAME
Regular Expression Methods
Helper.RE.{TYPE}.
- get
- find
- replace
- verify
Validators
IS Helpers
Helper.IS.
- array
- boolean
- date
- empty
- null
- number
- object
- plate
- string
IS ARRAY Helpers
Helper.IS.ARRAY.
- in
- unique
IS STRING Helpers
Helper.IS.STRING.
- bankCard
- color
- date
- domain
- hexColor
- ip4
- jsonDate
- mobile
- nationalCode
- number
- numeric
- objectId
- time
- url
Helpers
Bank Helpers
Iran bank cards numbers functionalities
Helper.BANK.
- findCard
- getList
Color Helpers
Supported formats: HEX, HSL, RGB
Helper.COLOR.
- getFormat
- getGradient
- getShade
- toHEX
- toHSL
- toRGB
Date Helpers
Helper.DATE.
- getDays
- getMonths
- getDuration
- getSeconds
- jalaliPeriod
- toString
Geo Helpers
Helper.GEO.
- location
- distance
Number Helpers
Helper.NUMBER.
- format
- getTitle
- toEN
- toFA
- toFileSize
Password Helpers
Helper.PASSWORD.
- generate
- getStrength
Plate Helpers
Helper.PLATE.
- letters
- getPlate
- toString
State Helpers
Helper.STATE.
- states
- cities
- findOneById
- findByTitle
- findOneByTitle
- CITY.findByState
- CITY.findOneById
- CITY.findByTitle
- CITY.findOneByTitle
String Helpers
Helper.STRING.
- changeNumbers
- escapeHTML
- getBankCardView
- getFileName
- getMobileView
- getRandom
- hasPersian
- toFileSize
Time Helpers
Helper.TIME.
- getDuration
- toString
UNIT Helpers
Unit Types
Helper.UNIT.
- AREA
- LENGTH
- VOLUME
- WEIGHT
Unit Methods
Helper.UNIT.{TYPE}.
- list
- options
- getTitle
- getRate
- convert