File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 4
4
* License: Apache 2
5
5
* Author: https://elmah.io
6
6
*/
7
- ( function ( ) {
7
+
8
+ ( function ( root , factory ) {
9
+ if ( typeof define === 'function' && define . amd ) {
10
+ // AMD
11
+ define ( [ ] , factory ) ;
12
+ } else if ( typeof module === 'object' && module . exports ) {
13
+ // Node, CommonJS-like
14
+ module . exports = factory ( ) ;
15
+ } else {
16
+ // Browser globals (root is window)
17
+ root . jsStack = factory ( ) ;
18
+ }
19
+ } ( typeof self !== 'undefined' ? self : this , function ( ) {
8
20
'use strict' ;
9
21
10
22
function jsStack ( element , options ) {
101
113
}
102
114
103
115
// Expose the plugin globally
104
- window . jsStack = function ( selector , options ) {
116
+ function jsStackLibrary ( selector , options ) {
105
117
var elements = document . querySelectorAll ( selector ) ;
106
118
initJsStack ( Array . from ( elements ) , options ) ;
107
- } ;
108
- } ) ( ) ;
119
+ }
120
+
121
+ return jsStackLibrary ;
122
+
123
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments