{"id":43388375,"url":"https://github.com/cyphrme/umdtutorial","last_synced_at":"2026-02-02T12:02:40.450Z","repository":{"id":107105895,"uuid":"554483687","full_name":"Cyphrme/UMDTutorial","owner":"Cyphrme","description":"UMD tutorial","archived":false,"fork":false,"pushed_at":"2023-01-13T21:09:10.000Z","size":6,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-15T17:00:39.473Z","etag":null,"topics":["esbuild","javascript","javascript-modules","umd","umd-modules"],"latest_commit_sha":null,"homepage":"https://cyphrme.github.io/UMD_tutorial/module.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyphrme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2022-10-19T22:22:14.000Z","updated_at":"2023-06-26T16:44:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0196dbd-0000-44ce-b075-40a2e1fd11cb","html_url":"https://github.com/Cyphrme/UMDTutorial","commit_stats":null,"previous_names":["cyphrme/umdtutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Cyphrme/UMDTutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyphrme%2FUMDTutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyphrme%2FUMDTutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyphrme%2FUMDTutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyphrme%2FUMDTutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyphrme","download_url":"https://codeload.github.com/Cyphrme/UMDTutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyphrme%2FUMDTutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29012203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T10:37:29.253Z","status":"ssl_error","status_checked_at":"2026-02-02T10:37:28.644Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esbuild","javascript","javascript-modules","umd","umd-modules"],"created_at":"2026-02-02T12:02:35.744Z","updated_at":"2026-02-02T12:02:40.441Z","avatar_url":"https://github.com/Cyphrme.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This repository serves as documentation and testing for UMD.\n\n## Imports\n\n## Module\n- Will not work as `file://` because browser throws an error.  Works `http://` and `https://`\n- Will work with `window.`, but this is bad practice when the file is\n  anticipated to be a module.  \n- Namespace imports are ignored (i.e., `import * as UMD from './umd.js'`, UMD is ignored.\n\t- We believe this is because it is directly exported by the module to globals, so there is no export to import by the importing module.  \n- Modules must use the export that's in the UMD section.  \n\t- From the exporting file: `factory(global.ExampleUMD = {})` but be referred to as `ExampleUMD`\n\n## Non-Module\n- Will work when being server over `file://`, `http://` and `https://`.\n- Must use `window.ExampleUMD` and cannot use the export directly, i.e.`ExampleUMD`.\n- Cannot use `import` in any Javascript.  \n- In the UMD export, the `global.` becomes `window.` for the browser.\n\t- This is why the UMD library doesn't ever refer to `window`.  \n\n# Var Encapsulate\n- UMD declaration must be at the end of the file.  This is unlike the\n  unencapsulated version which allows the declaration and exports at the\n  beginning of the file.  \n\n\n# Resources\nUseful examples and documentation on UMD:\n\nBlogs:\nhttps://jameshfisher.com/2020/10/04/what-are-umd-modules/\nhttps://jakearchibald.com/2017/es-modules-in-browsers/\nhttps://salomvary.com/es6-modules-in-browsers.html\n\nIssues:\nhttps://github.com/systemjs/systemjs/issues/2064\nhttps://github.com/systemjs/systemjs/issues/1933\n\nhttps://github.com/paroi-tech/direct-vuex/issues/14\n\nRepos:\nhttps://github.com/umdjs/umd/\n\nOther:\nhttps://stackoverflow.com/a/63751410/15147681\nhttps://github.com/paulmillr/noble-secp256k1/releases/tag/1.6.3\nhttps://github.com/evanw/esbuild/issues/507#issuecomment-1221091273\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphrme%2Fumdtutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyphrme%2Fumdtutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyphrme%2Fumdtutorial/lists"}