UNPKG

lenye_base

Version:

基础方法

10 lines (8 loc) 244 B
/** * Returns a new array with n elements removed from the right. */ var dropRight = function (arr) { var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; return arr.slice(0, -n); }; export default dropRight;