string-intersection

0.2.0 • Public • Published

string-intersection

Collects all characters from string that are found in a second string. Always returns an array, containing the found characters, if any



const intersection = require('string-intersection');

intersection('love', 'evolve');
// [ 'l', 'o', 'v', 'e' ]


// you can add a handler for handling type errors (see: message-events npm package)
intersection.onError(console.error);

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i string-intersection

    Weekly Downloads

    1

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    4.69 kB

    Total Files

    6

    Last publish

    Collaborators

    • sygn