Closed aripalo closed 7 years ago
Thx, will take a look at this shortly.
On Feb 9, 2017 02:00, "Ari Palo" notifications@github.com wrote:
Fixes #50 https://github.com/websanova/js-url/issues/50.
If AMD loader is present (basically when (typeof define === 'function' && define.amd !== undefined) is truthy) the script registers itself as anonymous AMD module without polluting global window-object or extending jQuery.
This means that one can use the script by:
require(['http://example.com/url.min.js'], function(privateJsUrl) { console.log(typeof window.url); // -> undefined console.log(typeof $.url); // -> undefined console.log(typeof privateJsUrl); // -> function console.log(privateJsUrl('domain', 'http://foo.bar.example.com')); // -> example.com });
You can view, comment on, or merge this pull request online at:
https://github.com/websanova/js-url/pull/54 Commit Summary
- add .editorconfig
- format url.js with editorconfig
- wrap to IIFE and explicitly assign to window
- define as AMD module
- update minified version
- fix AMD definition
- describe AMD functionality
- some text adjustment on README
- some text adjustment on README
- some text adjustment on README
File Changes
- A .editorconfig https://github.com/websanova/js-url/pull/54/files#diff-0 (12)
- M README.md https://github.com/websanova/js-url/pull/54/files#diff-1 (4)
- M url.js https://github.com/websanova/js-url/pull/54/files#diff-2 (291)
- M url.min.js https://github.com/websanova/js-url/pull/54/files#diff-3 (2)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/websanova/js-url/pull/54, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkcyySDunH01-Hd8wpNxgX8bjmnE41sks5rahC0gaJpZM4L7OJO .
Ok, this has been pushed up as v2.4.0
Thx, for adding this :-)
Can't see v2.4: https://github.com/websanova/js-url/releases
Thus bower installs 2.3.1
Whoops, sorry. Pushed now.
https://github.com/websanova/js-url/releases/tag/v2.4.0
On Thu, Feb 16, 2017 at 5:11 AM, Oytun Tez notifications@github.com wrote:
Can't see v2.4: https://github.com/websanova/js-url/releases
Thus bower installs 2.3.1
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/websanova/js-url/pull/54#issuecomment-280156740, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkcy2GCaYUeU9g4kiIxB-QoprXXDzNWks5rc3gRgaJpZM4L7OJO .
Perfect! Pulling it right away. Fresh release, mmmmmm...
Fixes #50.
If AMD loader is present (basically when
(typeof define === 'function' && define.amd !== undefined)
is truthy) the script registers itself as anonymous AMD module without polluting globalwindow
-object or extendingjQuery
.This means that one can use the script by: