文件操作 - array.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/fast-glob/out/utils/array.js
编辑文件内容
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.splitWhen = exports.flatten = void 0; function flatten(items) { return items.reduce((collection, item) => [].concat(collection, item), []); } exports.flatten = flatten; function splitWhen(items, predicate) { const result = [[]]; let groupIndex = 0; for (const item of items) { if (predicate(item)) { groupIndex++; result[groupIndex] = []; } else { result[groupIndex].push(item); } } return result; } exports.splitWhen = splitWhen;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件