File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,19 @@ RegExp.escape= function(s) {
31
31
return s . replace ( / [ - \/ \\ ^ $ * + ? . ( ) | [ \] { } ] / g, '\\$&' ) ;
32
32
} ;
33
33
34
- ( function ( $ ) {
34
+ ( function ( undefined ) {
35
35
'use strict'
36
+
37
+ var $ ;
38
+
39
+ // to keep backwards compatibility
40
+ if ( typeof jQuery !== 'undefined' && jQuery ) {
41
+ $ = jQuery ;
42
+ } else {
43
+ $ = { } ;
44
+ }
45
+
46
+
36
47
/**
37
48
* jQuery.csv.defaults
38
49
* Encapsulates the method paramater defaults for the CSV plugin module.
@@ -945,4 +956,10 @@ RegExp.escape= function(s) {
945
956
$ . csv2Array = $ . csv . toArrays ;
946
957
$ . csv2Dictionary = $ . csv . toObjects ;
947
958
948
- } ) ( jQuery ) ;
959
+ // CommonJS module is defined
960
+ if ( typeof module !== 'undefined' && module . exports ) {
961
+ module . exports = $ . csv ;
962
+ }
963
+
964
+ } ) . call ( this ) ;
965
+
You can’t perform that action at this time.
0 commit comments