@tknf/japhonex
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

Dependencies (0)

    Dev Dependencies (10)

    Package Sidebar

    Install

    npm i @tknf/japhonex

    Weekly Downloads

    0

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    7 kB

    Total Files

    9

    Last publish

    Collaborators

    • mast1ff