Browse code

Refactor and rewrite as contao bundle

Benjamin Roth authored on04/11/2022 22:32:32
Showing1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,56 +0,0 @@
1
-function isObject(o) {
2
-  return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
3
-}
4
-
5
-function extend(target, src) {
6
-  Object.keys(src).forEach(function (key) {
7
-    if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
8
-      extend(target[key], src[key]);
9
-    } else {
10
-      target[key] = src[key];
11
-    }
12
-  });
13
-}
14
-
15
-function needsNavigation(params) {
16
-  if (params === void 0) {
17
-    params = {};
18
-  }
19
-
20
-  return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';
21
-}
22
-
23
-function needsPagination(params) {
24
-  if (params === void 0) {
25
-    params = {};
26
-  }
27
-
28
-  return params.pagination && typeof params.pagination.el === 'undefined';
29
-}
30
-
31
-function needsScrollbar(params) {
32
-  if (params === void 0) {
33
-    params = {};
34
-  }
35
-
36
-  return params.scrollbar && typeof params.scrollbar.el === 'undefined';
37
-}
38
-
39
-function uniqueClasses(classNames) {
40
-  if (classNames === void 0) {
41
-    classNames = '';
42
-  }
43
-
44
-  var classes = classNames.split(' ').map(function (c) {
45
-    return c.trim();
46
-  }).filter(function (c) {
47
-    return !!c;
48
-  });
49
-  var unique = [];
50
-  classes.forEach(function (c) {
51
-    if (unique.indexOf(c) < 0) unique.push(c);
52
-  });
53
-  return unique.join(' ');
54
-}
55
-
56
-export { isObject, extend, needsNavigation, needsPagination, needsScrollbar, uniqueClasses };
57 0
\ No newline at end of file
Browse code

swiper.js version 6.5.0

Benjamin Roth authored on14/03/2021 15:29:46
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
1
+function isObject(o) {
2
+  return typeof o === 'object' && o !== null && o.constructor && o.constructor === Object;
3
+}
4
+
5
+function extend(target, src) {
6
+  Object.keys(src).forEach(function (key) {
7
+    if (typeof target[key] === 'undefined') target[key] = src[key];else if (isObject(src[key]) && isObject(target[key]) && Object.keys(src[key]).length > 0) {
8
+      extend(target[key], src[key]);
9
+    } else {
10
+      target[key] = src[key];
11
+    }
12
+  });
13
+}
14
+
15
+function needsNavigation(params) {
16
+  if (params === void 0) {
17
+    params = {};
18
+  }
19
+
20
+  return params.navigation && typeof params.navigation.nextEl === 'undefined' && typeof params.navigation.prevEl === 'undefined';
21
+}
22
+
23
+function needsPagination(params) {
24
+  if (params === void 0) {
25
+    params = {};
26
+  }
27
+
28
+  return params.pagination && typeof params.pagination.el === 'undefined';
29
+}
30
+
31
+function needsScrollbar(params) {
32
+  if (params === void 0) {
33
+    params = {};
34
+  }
35
+
36
+  return params.scrollbar && typeof params.scrollbar.el === 'undefined';
37
+}
38
+
39
+function uniqueClasses(classNames) {
40
+  if (classNames === void 0) {
41
+    classNames = '';
42
+  }
43
+
44
+  var classes = classNames.split(' ').map(function (c) {
45
+    return c.trim();
46
+  }).filter(function (c) {
47
+    return !!c;
48
+  });
49
+  var unique = [];
50
+  classes.forEach(function (c) {
51
+    if (unique.indexOf(c) < 0) unique.push(c);
52
+  });
53
+  return unique.join(' ');
54
+}
55
+
56
+export { isObject, extend, needsNavigation, needsPagination, needsScrollbar, uniqueClasses };
0 57
\ No newline at end of file