⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
invoice
/
node_modules
/
es-abstract
/
2015
/
Edit File: CompletionRecord.js
'use strict'; var GetIntrinsic = require('get-intrinsic'); var $SyntaxError = GetIntrinsic('%SyntaxError%'); var SLOT = require('internal-slot'); // https://262.ecma-international.org/6.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 === 'normal') { return value; } if (type === 'throw') { throw value; } throw new $SyntaxError('Completion Record is not of type "normal" or "throw": other types not supported'); }; 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;
Simpan