{"id":16355177,"url":"https://github.com/loatheb/nedo","last_synced_at":"2025-03-23T01:31:15.157Z","repository":{"id":127551389,"uuid":"135779352","full_name":"loatheb/nedo","owner":"loatheb","description":"a commonJS hook to load modules from url at runtime.","archived":false,"fork":false,"pushed_at":"2018-07-14T08:14:43.000Z","size":96,"stargazers_count":23,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T16:14:18.237Z","etag":null,"topics":["commonjs","commonjs-modules","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loatheb.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-02T02:06:00.000Z","updated_at":"2023-10-21T12:16:42.000Z","dependencies_parsed_at":"2023-05-23T07:15:25.909Z","dependency_job_id":null,"html_url":"https://github.com/loatheb/nedo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loatheb%2Fnedo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loatheb%2Fnedo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loatheb%2Fnedo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loatheb%2Fnedo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loatheb","download_url":"https://codeload.github.com/loatheb/nedo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245043916,"owners_count":20551850,"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":["commonjs","commonjs-modules","nodejs"],"created_at":"2024-10-11T01:39:39.868Z","updated_at":"2025-03-23T01:31:15.140Z","avatar_url":"https://github.com/loatheb.png","language":"JavaScript","readme":"# NEDO\n\nNode 端 CommonJS 规范增强版，支持运行时从 url 和 ts 文件加载模块...\n\n[![Build Status](https://travis-ci.org/loatheb/nedo.svg?branch=master)](https://travis-ci.org/loatheb/nedo)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n[[English doc](https://github.com/loatheb/nedo/blob/master/README.md)]\n[[中文文档](https://github.com/loatheb/nedo/blob/master/README-CN.md)]\n\n### 示例\n\n- 从 url 加载一个 CommonJS 模块\n\n```js\nconst r = require(\"nedo\");\n\nconst code = r(\n  \"https://raw.githubusercontent.com/loatheb/nedo/master/__test/case/code.js\"\n);\nconsole.log(code); // hello code.js\n```\n\n- 从 ts 文件加载一个 CommonJS 模块\n\n```js\nconst r = require(\"nedo\");\n\nconst code = r(\"./code.ts\");\nconsole.log(code); // hello code.ts\n```\n\n- 顶层 await\n\n```js\n// index.js\nconst r = require(\"nedo\");\n\nr(\"./code.js\");\n\n\n// code.js: 这里并不需要将 await 包裹在 async 函数中\nawait doSomeAsyncThings();\n```\n\n### 测试用例\n\n可以 review [\\_\\_test/index.js](https://github.com/loatheb/nedo/blob/master/__test/index.js) 来获取更多关于使用的信息.\n\n![https://github.com/loatheb/nedo/blob/master/screenshot/testcase.jpg](https://github.com/loatheb/nedo/blob/master/screenshot/testcase.jpg)\n\n### 协议\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floatheb%2Fnedo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floatheb%2Fnedo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floatheb%2Fnedo/lists"}