Skip to main content
Module

x/rambda/source/takeLast-spec.ts

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