@tknf/japhonex
v0.1.2
Published
Regex builder and validator for japanese phone number
Downloads
1
Readme
Japhonex Node
Japanese phone number checker for Node.
Installation
$ npm i @tknf/japhonex
# or
$ yarn add @tknf/japhonex
Usage
In your app you can do something like:
import { japhonex } from "@tknf/japhonex";
const regex = japhonex({ hyphen: "optinal" });
regex.test("<Your input>");
Hyphen validation patterns
Optional (default)
const regex = japhonex({ hyphen: "optional" });
// 0xx-xxxx-xxxx or 0xxxxxxxxxx
Required
const regex = japhonex({ hyphen: "requied" });
// 0xx-xxxx-xxxx
No hyphen
const regex = japhonex({ hyphen: false });
// 0xxxxxxxxxx
Licence
MIT