{"id":22308782,"url":"https://github.com/ratson/esmeta","last_synced_at":"2025-03-26T01:28:56.485Z","repository":{"id":57230432,"uuid":"131040943","full_name":"ratson/esmeta","owner":"ratson","description":"Handy function to handle import.meta","archived":false,"fork":false,"pushed_at":"2018-05-02T12:08:37.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T13:17:15.368Z","etag":null,"topics":["esm","esmodules","import-meta","meta","node10"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ratson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-25T17:25:46.000Z","updated_at":"2023-09-14T22:07:29.000Z","dependencies_parsed_at":"2022-09-01T21:50:30.241Z","dependency_job_id":null,"html_url":"https://github.com/ratson/esmeta","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fesmeta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fesmeta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fesmeta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fesmeta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratson","download_url":"https://codeload.github.com/ratson/esmeta/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571277,"owners_count":20637314,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esm","esmodules","import-meta","meta","node10"],"created_at":"2024-12-03T20:15:17.395Z","updated_at":"2025-03-26T01:28:56.464Z","avatar_url":"https://github.com/ratson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esmeta\n\nHandy function to handle `import.meta`\n\n## Installation\n\n```\nnpm install esmeta --save\n```\n\n## Usage\n\n\u003c!-- eslint-disable strict,no-unused-vars --\u003e\n\n```js\nimport esmeta from 'esmeta'\n\nconst importMeta = esmeta(import.meta)\n/*\n{\n  url: \"file:///a/b/c.mjs\"  // same as `import.meta.url`\n  dirname: \"/a/b\"\n  filename: \"/a/b/c.mjs\"\n  dirnameJoin(...paths)  // helper function to join path\n  isMain()  // return true if match to `process.mainModule`\n  resolve()  // return the resolved filename like `require.resolve`\n}\n*/\n```\n\n## Related\n\n- [is-main](https://github.com/ratson/is-main) - Check if current module is main module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fesmeta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratson%2Fesmeta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fesmeta/lists"}