npm i tanxnat
- Module
common
- Root function
to
when import, you need import with syntaximport common from "tanxnat"
, then follow me in below:
const {to} = common
const {spacePhone, friendly, random, vn} = to
spacePhone
is function convert phone from0968381829
to0968 381 829
spacePhone("0968381829") => "0968 381 829"
random
is function random astring
with input is length also you will expect
random(7) => "tanXnat"
friendly
is function convert astring
touri
with input "My A Me" => "my-a-me"
friendly("My A Me") => "my-a-me"
vn
is function convertTôi là ai
toToi la ai
vn(`Tôi là ai`) => `Toi la ai`
- Module
core
-
deduplicate2nd
-
deduplicate
-
difference
-
debounce
-
throttle
-
parseUrl
-
unique
-
delay
-
group
-
unzip
-
uniq
-
flat
-
max
-
min
- Module
fp
-
get
-
pipe
-
curry
-
compose
- Module
handler
- response
- Module
validator
-
email
-
phone