0.1.2 • Published 3 years ago

@tknf/japhonex v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

0.1.2

3 years ago

0.1.1

3 years ago