文件操作 - sample.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/lodash/sample.js
编辑文件内容
var arraySample = require('./_arraySample'), baseSample = require('./_baseSample'), isArray = require('./isArray'); /** * Gets a random element from `collection`. * * @static * @memberOf _ * @since 2.0.0 * @category Collection * @param {Array|Object} collection The collection to sample. * @returns {*} Returns the random element. * @example * * _.sample([1, 2, 3, 4]); * // => 2 */ function sample(collection) { var func = isArray(collection) ? arraySample : baseSample; return func(collection); } module.exports = sample;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件