Source: cirosantilli/universal-module-definition
= Universal Module Definition
{c}
{title2=UMD}
{wiki}
Since <JavaScript> devs are incapable of defining an unified import standard, this design pattern emerged where you just check every magic global one by one. Here's a demo where a Js library works on both the <browser> and from <Node.js>:
* \a[web-cheat/umd_my_lib.js]: the library
* \a[web-cheat/umd.js]: <Node.js> user
* \a[web-cheat/umd.html]: <browser> user