文件操作 - findLast.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/lodash-es/findLast.js
编辑文件内容
import createFind from './_createFind.js'; import findLastIndex from './findLastIndex.js'; /** Detect free variable `globalThis` */ const freeGlobalThis = typeof globalThis == 'object' && globalThis !== null && globalThis.Object == Object && globalThis; /** * This method is like `_.find` except that it iterates over elements of * `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=collection.length-1] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * _.findLast([1, 2, 3, 4], function(n) { * return n % 2 == 1; * }); * // => 3 */ var findLast = createFind(findLastIndex); export default findLast;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件