UNPKG

imma

Version:

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

8 lines (6 loc) 257 B
'use strict' const objectReduceRight = require('../object/reduceRight') const reduceRight = module.exports = (iterable, fn, initial) => Array.isArray(iterable) ? iterable.reduceRight(fn, initial) : objectReduceRight(iterable, fn, initial)