persian-regex
validate persian inputs
Last updated a year ago by nimahkh .
WTFPL · Repository · Original npm · Tarball · package.json
$ cnpm install persian-regex 
SYNC missed versions from official npm registry.

Persian Regex

a nodejs package to Regex persian Strings

this package includes extra features to

Installation
npm install persian-regex
Run in Codes

es5

const regex=require('persian-regex');

const persianString="سلام دنیا - سلام ایران "
const Email="nima.2004hkh@gmail.com"
const Number="123456 "

console.log(regex.isPersian(persianString)); //true
console.log(regex.isPersian(Email)); //false
console.log(regex.isEmail(Number)); //false
console.log(regex.isEmail(Email)); // true
console.log(regex.isNumber(Email)); //false

jsx

import {isPersian,isEmail,isNumber} from "persian-regex";

const persianString="سلام دنیا - سلام ایران "
const Email="nima.2004hkh@gmail.com"
const Number="123456 "

console.log(isPersian(persianString));
console.log(isEmail(Email));
console.log(isNumber(Number));

the result of methods , is boolean .

:heartpulse:

Current Tags

  • 1.1.1                                ...           latest (a year ago)

3 Versions

  • 1.1.1                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |