any-match

    2.0.1 • Public • Published

    any-match NPM Version Build Status Dependency Monitor

    Determine if a single match exists with an array of strings/numbers/regexes.

    Installation

    Node.js >= 6 is required. To install, type this at the command line:

    npm install any-match

    Usage

    const anyMatch = require('any-match');
     
    anyMatch('a', ['a', 'b']);  //-> true
    anyMatch('c', ['a', 'b']);  //-> false
     
    anyMatch(1, [0, 1]);  //-> true
     
    anyMatch('abc', [/^abc$/]);  //-> true

    Install

    npm i any-match

    DownloadsWeekly Downloads

    251

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    4.05 kB

    Total Files

    6

    Last publish

    Collaborators

    • stevenvachon