ia

in_array

The Javascript version of "in_array" php function from the php.js project - http://phpjs.org/

Showing:

Popularity

Downloads/wk

102

GitHub Stars

5

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

in_array

Build Status Coverage Status Made with vim

This is the Javascript implementation of the in_array php function. The function is originally made by the php.js organization and its contributors.

Instalation

With npm:

npm install --save in_array

With Bower:

bower install --save in_array

Or you can just download a ZIP.

Setup

Node or Browserify
var in_array = require('in_array');
Browser (Global)
<script src="in_array.js"></script>

Usage


in_array(item, arrayOrObject, useStrictMode);

console.log(in_array(1, ['1', '2', '3'])); // Returns: true
console.log(in_array(1, ['1', '2', '3'], true)); // Returns 'false' because the strict mode is on.
console.log(in_array(1, {key: 1})); // Returns: true

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial