mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
8 lines
No EOL
234 B
JavaScript
8 lines
No EOL
234 B
JavaScript
|
|
import { pathToFileURL } from 'node:url';
|
|
|
|
// returns true if the passsed file is being invoked from node,
|
|
// not imported.
|
|
export function isMain(importMetaUrl) {
|
|
return importMetaUrl === pathToFileURL(process.argv[1]).href;
|
|
} |