@aw030/in_array

1.0.2 • Public • Published

in_array

Nodejs module in_array function similar to PHP function in_array().

Example

const in_array = require("@aw030/in_array");

let needle = "needle";
let haystack = ["needle", "noodle"];

if (in_array(needle, haystack)){
    console.log("str is in array!");
}else{
    console.log("str is not in array!")
}

/@aw030/in_array/

    Package Sidebar

    Install

    npm i @aw030/in_array

    Weekly Downloads

    3

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    1.25 kB

    Total Files

    3

    Last publish

    Collaborators

    • aw030