文件操作 - sum.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/lodash-es/sum.js
编辑文件内容
import baseSum from './_baseSum.js'; import identity from './identity.js'; /** Detect free variable `globalThis` */ const freeGlobalThis = typeof globalThis == 'object' && globalThis !== null && globalThis.Object == Object && globalThis; /** * Computes the sum of the values in `array`. * * @static * @memberOf _ * @since 3.4.0 * @category Math * @param {Array} array The array to iterate over. * @returns {number} Returns the sum. * @example * * _.sum([4, 2, 8, 6]); * // => 20 */ function sum(array) { return (array && array.length) ? baseSum(array, identity) : 0; } export default sum;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件