Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

vikit

0.3.4 • Public • Published

vikit - Vietnamese Kit

Vikit is a collection of funtions that will solve common problem in Vietnamese

How to use

Install the package:

npm install --save vikit

API

noDiacriticDash(str)

Remove Vietnamese diacritics from the string and make a dashed string without diacritics.

const {noDiacriticDash} = require('vikit')
 
const str = 'Vì Đức Chúa Trời yêu thương thế gian'
const result = noDiacriticDas(str)
console.log(resut) // 'vi-duc-chua-troi-yeu-thuong-the-gian'

changePhonePrefix(phoneNumber)

Change phone number with the new prefix. Chuyển đổi đầu số các nhà mạng từ 11 số sang 10 số.

const {changePhonePrefix} = require('vikit')
 
const oldPhone = '01222010203'
const newPhone = changePhonePrefix(oldPhone)
console.log(newPhone) // 0772010203

Install

npm i vikit

DownloadsWeekly Downloads

9

Version

0.3.4

License

MIT

Unpacked Size

15.3 kB

Total Files

14

Last publish

Collaborators

  • avatar