Skip to main content
Module

x/rambda/source/includes-spec.ts

Faster and smaller alternative to Ramda
Latest
File
import {includes} from 'rambda'
const list = [{a: {b: '1'}}, {a: {c: '2'}}, {a: {b: '3'}}]
describe('R.includes', () => { it('happy', () => { const result = includes({a: {b: '1'}}, list) result // $ExpectType boolean const result2 = includes('oo', ['f', 'oo']) result2 // $ExpectType boolean }) it('with string', () => { const str = 'foo' as 'foo' | 'bar' const result = includes('oo', str) const curriedResult = includes('oo')(str)
result // $ExpectType boolean curriedResult // $ExpectType boolean })})