1.0.3 • Published 1 year ago

have-matching v1.0.3

Weekly downloads
-
License
Unlicense
Repository
github
Last release
1 year ago

have-matching

Compare two values with some options.

NPM

Node Version NPM Version NPM Downloads

Install

npm install have-matching

Usage

const haveMatching = require("have-matching");
haveMatching("t5est", "tSet5")); // true

Tests

npm test

Examples

haveMatching("test", "tSet5")); // false
haveMatching("t5est", "tSet5")); // true
haveMatching(889, "988")); // true
haveMatching("test", "tSet/8", { onlyLetters: true })); // true
haveMatching("test", "tSet8", { onlyNumbers: true })); // false
haveMatching("abc889", "98xyz8", { onlyNumbers: true })); // true
haveMatching("test", "tesT", { caseSensitive: true })); // false
haveMatching("test8", "tSe8t//.", {
    onlyNumbers: true,
    onlyLetters: true,
  })
); // true
haveMatching("test", ["te", "st"])); // false
haveMatching("test", ["tSet", "st"])); // true
haveMatching(8, ["88", "test"])); // false
haveMatching("test", "Test", { orderMatter: true })); // true

haveMatching("test8", "test8", {
    orderMatter: true,
    onlyNumbers: true,
    caseSensitive: true,
    onlyLetters: true,
  })
); // true
1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago