source: frontend/node_modules/underscore/modules/contains.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 404 bytes
Line 
1import isArrayLike from './_isArrayLike.js';
2import values from './values.js';
3import indexOf from './indexOf.js';
4
5// Determine if the array or object contains a given item (using `===`).
6export default function contains(obj, item, fromIndex, guard) {
7 if (!isArrayLike(obj)) obj = values(obj);
8 if (typeof fromIndex != 'number' || guard) fromIndex = 0;
9 return indexOf(obj, item, fromIndex) >= 0;
10}
Note: See TracBrowser for help on using the repository browser.