eligius 1.0.7 → 1.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,31 @@
1
+ import $ from 'jquery';
1
2
  import { isDefined } from 'ts-is-present';
2
3
  import fs from 'fs';
3
4
  import path from 'path';
4
5
  import lottie from 'lottie-web';
5
- import $ from 'jquery';
6
6
  import hotkeys from 'hotkeys-js';
7
7
  import { v4 } from 'uuid';
8
8
 
9
9
  function prepareValueForSerialization(value) {
10
10
  if (Array.isArray(value)) {
11
11
  return value.map(prepareValueForSerialization);
12
- } else if (value instanceof jQuery) {
12
+ } else if (value instanceof $) {
13
13
  return 'jQuery object';
14
14
  } else if (typeof value === 'object') {
15
15
  return Object.fromEntries(Object.entries(value).map(function (_ref) {
16
- var name = _ref[0],
17
- value = _ref[1];
18
- return [name, prepareValueForSerialization(value)];
16
+ var propName = _ref[0],
17
+ propValue = _ref[1];
18
+ return [propName, prepareValueForSerialization(propValue)];
19
19
  }));
20
20
  } else if (typeof value === 'function') {
21
21
  var funcString = value.toString();
22
- return funcString.substring(0, funcString.indexOf('{') + 1);
22
+ var paranIndex = funcString.indexOf('{');
23
+
24
+ if (paranIndex > -1) {
25
+ return funcString.substring(0, funcString.indexOf('{') + 1);
26
+ }
27
+
28
+ return funcString;
23
29
  }
24
30
 
25
31
  return value;