文件操作 - shim.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/function.prototype.name/shim.js
编辑文件内容
'use strict'; var supportsDescriptors = require('define-properties').supportsDescriptors; var functionsHaveNames = require('functions-have-names')(); var getPolyfill = require('./polyfill'); var defineProperty = Object.defineProperty; var TypeErr = TypeError; module.exports = function shimName() { var polyfill = getPolyfill(); if (functionsHaveNames) { return polyfill; } if (!supportsDescriptors) { throw new TypeErr('Shimming Function.prototype.name support requires ES5 property descriptor support.'); } var functionProto = Function.prototype; defineProperty(functionProto, 'name', { configurable: true, enumerable: false, get: function () { var name = polyfill.call(this); if (this !== functionProto) { defineProperty(this, 'name', { configurable: true, enumerable: false, value: name, writable: false }); } return name; } }); return polyfill; };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件