文件操作 - CompletionRecord.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/es-abstract/2017/CompletionRecord.js
编辑文件内容
'use strict'; var $SyntaxError = require('es-errors/syntax'); var SLOT = require('internal-slot'); // https://262.ecma-international.org/7.0/#sec-completion-record-specification-type var CompletionRecord = function CompletionRecord(type, value) { if (!(this instanceof CompletionRecord)) { return new CompletionRecord(type, value); } if (type !== 'normal' && type !== 'break' && type !== 'continue' && type !== 'return' && type !== 'throw') { throw new $SyntaxError('Assertion failed: `type` must be one of "normal", "break", "continue", "return", or "throw"'); } SLOT.set(this, '[[Type]]', type); SLOT.set(this, '[[Value]]', value); // [[Target]] slot? }; CompletionRecord.prototype.type = function Type() { return SLOT.get(this, '[[Type]]'); }; CompletionRecord.prototype.value = function Value() { return SLOT.get(this, '[[Value]]'); }; CompletionRecord.prototype['?'] = function ReturnIfAbrupt() { var type = SLOT.get(this, '[[Type]]'); var value = SLOT.get(this, '[[Value]]'); if (type === 'throw') { throw value; } return value; }; CompletionRecord.prototype['!'] = function assert() { var type = SLOT.get(this, '[[Type]]'); if (type !== 'normal') { throw new $SyntaxError('Assertion failed: Completion Record is not of type "normal"'); } return SLOT.get(this, '[[Value]]'); }; module.exports = CompletionRecord;
修改文件时间
将文件时间修改为当前时间的前一年
删除文件