1.0.0 • Published 3 years ago

is-name v1.0.0

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

is-name

Checks if the given string contains a human name

Install

$ npm install is-name
// or
$ yarn add is-name

Import

const { isName, matchName } = require("is-name");

Usage

isName("Sebastian Peter Korotkiewicz"); // boolean: true
isName("Sebastian Korotkiewicz"); // boolean: true
isName("Apple"); // boolean: false

matchName("Hello I'm Sebastian Peter Korotkiewicz and you?");
// array: [ 'Sebastian Peter Korotkiewicz' ]

matchName("Hello I'm Sebastian Korotkiewicz and you?");
// array: [ 'Sebastian Korotkiewicz' ]