文件操作 - browser.js
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/nodejs/has-dynamic-import/browser.js
编辑文件内容
'use strict'; var callBound = require('call-bind/callBound'); var $then = callBound('Promise.prototype.then', true); var pFalse = $then && Promise.resolve(false); var thunkFalse = function () { return false; }; var thunkTrue = function () { return true; }; module.exports = function hasFunctionality() { if (!$then) { return { then: function (resolve) { resolve(false); } }; } try { var promise = Function('return import("data:text/javascript,")')(); // eslint-disable-line no-new-func return $then(promise, thunkTrue, thunkFalse); } catch (e) { return pFalse; } };
修改文件时间
将文件时间修改为当前时间的前一年
删除文件