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 44 * License: Apache 2
55 * Author: https://elmah.io
66 */
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 ( ) {
820 'use strict' ;
921
1022 function jsStack ( element , options ) {
101113 }
102114
103115 // Expose the plugin globally
104- window . jsStack = function ( selector , options ) {
116+ function jsStackLibrary ( selector , options ) {
105117 var elements = document . querySelectorAll ( selector ) ;
106118 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