Skip to content

Instantly share code, notes, and snippets.

@slvnperron
Last active February 11, 2024 23:13
Show Gist options
  • Save slvnperron/24e2a30a6643b4508b32 to your computer and use it in GitHub Desktop.
Save slvnperron/24e2a30a6643b4508b32 to your computer and use it in GitHub Desktop.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['b'], factory);
} else {
// Browser globals
root.amdWeb = factory(root.b);
}
}(this, function (b) {
//use b in some fashion.
// Just return a value to define the module export.
// This example returns an object, but the module
// can return a function as the exported value.
return {};
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment