UNPKG

imma

Version:

A collection of functions for dealing with native arrays and objects immutably

10 lines (7 loc) 288 B
'use strict' const objectSome = require('../object/some') const createPredicate = value => other => other === value const includes = module.exports = (iterable, value) => Array.isArray(iterable) ? iterable.includes(value) : objectSome(object, createPredicate(value))