Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9895305
import_meta_filename_capture.mjs
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
614 B
Referenced Files
None
Subscribers
None
import_meta_filename_capture.mjs
View Options
function assert(condition, message) {
if (!condition) throw new Error(message);
}
const topFilename = import.meta.filename;
function nestedFilename() {
return import.meta.filename;
}
async function asyncFilename() {
await 0;
return import.meta.filename;
}
const nested = nestedFilename();
const asyncValue = await asyncFilename();
assert(nested === topFilename, `nested import.meta.filename drifted: ${nested} !== ${topFilename}`);
assert(asyncValue === topFilename, `async import.meta.filename drifted: ${asyncValue} !== ${topFilename}`);
console.log(`import.meta.filename.capture:${topFilename}`);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Aug 1, 12:17 PM (22 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
588034
Default Alt Text
import_meta_filename_capture.mjs (614 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment