Skip to main content
Module

x/rambda/source/take-spec.ts

Faster and smaller alternative to Ramda
Go to Latest
File
import {take} from 'rambda'
const list = [1, 2, 3, 4]const str = 'foobar'const howMany = 2
describe('R.take - array', () => { it('happy', () => { const result = take(howMany, list)
result // $ExpectType number[] }) it('curried', () => { const result = take(howMany)(list)
result // $ExpectType number[] })})
describe('R.take - string', () => { it('happy', () => { const result = take(howMany, str)
result // $ExpectType string }) it('curried', () => { const result = take(howMany)(str)
result // $ExpectType string })})