UNPKG

ramda

Version:

A practical functional library for JavaScript programmers.

9 lines 232 B
var slice = /*#__PURE__*/require("../slice.js"); function dropLastWhile(pred, xs) { var idx = xs.length - 1; while (idx >= 0 && pred(xs[idx])) { idx -= 1; } return slice(0, idx + 1, xs); } module.exports = dropLastWhile;