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(props) {
16
-  if (props === void 0) {
17
-    props = {};
18
-  }
19
-
20
-  return props.navigation && typeof props.navigation.nextEl === 'undefined' && typeof props.navigation.prevEl === 'undefined';
21
-}
22
-
23
-function needsPagination(props) {
24
-  if (props === void 0) {
25
-    props = {};
26
-  }
27
-
28
-  return props.pagination && typeof props.pagination.el === 'undefined';
29
-}
30
-
31
-function needsScrollbar(props) {
32
-  if (props === void 0) {
33
-    props = {};
34
-  }
35
-
36
-  return props.scrollbar && typeof props.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.4.5

Benjamin Roth authored on17/01/2021 16:24:34
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(props) {
16
+  if (props === void 0) {
17
+    props = {};
18
+  }
19
+
20
+  return props.navigation && typeof props.navigation.nextEl === 'undefined' && typeof props.navigation.prevEl === 'undefined';
21
+}
22
+
23
+function needsPagination(props) {
24
+  if (props === void 0) {
25
+    props = {};
26
+  }
27
+
28
+  return props.pagination && typeof props.pagination.el === 'undefined';
29
+}
30
+
31
+function needsScrollbar(props) {
32
+  if (props === void 0) {
33
+    props = {};
34
+  }
35
+
36
+  return props.scrollbar && typeof props.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