Skip to content

Instantly share code, notes, and snippets.

@DinoChiesa
Created November 9, 2017 01:04
Show Gist options
  • Save DinoChiesa/97653d8617b8a30db602cd5d4c0018ba to your computer and use it in GitHub Desktop.
Save DinoChiesa/97653d8617b8a30db602cd5d4c0018ba to your computer and use it in GitHub Desktop.
$ diff URI.js URI-orig.js
15,16c15,25
< // Node
< module.exports = factory(null, null, null, root);
---
> // https://github.com/umdjs/umd/blob/master/returnExports.js
> if (typeof module === 'object' && module.exports) {
> // Node
> module.exports = factory(require('./punycode'), require('./IPv6'), require('./SecondLevelDomains'));
> } else if (typeof define === 'function' && define.amd) {
> // AMD. Register as an anonymous module.
> define(['./punycode', './IPv6', './SecondLevelDomains'], factory);
> } else {
> // Browser globals (root is window)
> root.URI = factory(root.punycode, root.IPv6, root.SecondLevelDomains, root);
> }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment