@bigbinary/neeto-commons-frontend 2.0.12 → 2.0.13

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.
package/react-utils.js CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { useState, useEffect, useMemo, useRef, useReducer } from 'react';
3
3
  import { Search, Check, Copy, Help, LeftArrow as LeftArrow$1, User, Settings } from '@bigbinary/neeto-icons';
4
4
  import { Dropdown, Input, Checkbox, Typography, Tooltip, Button, Toastr, Modal, PageLoader } from '@bigbinary/neetoui';
5
- import { curry, isNil, complement as complement$1, isEmpty, includes, __, filter, trim, toLower, identity, without, append, fromPairs, keys, values, last, pluck, any, uniq, intersection, mergeLeft, not as not$2, toPairs, assoc } from 'ramda';
5
+ import { curryN, isNil, complement as complement$1, isEmpty, curry, includes, __, filter, trim, toLower, identity, without, append, fromPairs, keys, values, last, pluck, any, uniq, intersection, mergeLeft, not as not$2, toPairs, assoc } from 'ramda';
6
6
  import dayjs from 'dayjs';
7
7
  import relativeTime from 'dayjs/plugin/relativeTime';
8
8
  import updateLocale from 'dayjs/plugin/updateLocale';
@@ -120,9 +120,57 @@ function _typeof$3(obj) {
120
120
  }, _typeof$3(obj);
121
121
  }
122
122
 
123
+ /**
124
+ * @template {Function} T
125
+ * @param {T} func
126
+ * @returns {T}
127
+ */
128
+
129
+ var nullSafe = function nullSafe(func) {
130
+ return (// @ts-ignore
131
+ curryN(func.length, function () {
132
+ var _ref;
133
+
134
+ var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
135
+ return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
136
+ })
137
+ );
138
+ };
139
+ var noop$2 = function noop() {};
140
+ var isNotEmpty = /*#__PURE__*/complement$1(isEmpty);
141
+
142
+ var slugify = function slugify(string) {
143
+ return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
144
+ .replace(/&/g, "-and-") // Replace & with 'and'
145
+ .replace(/[^\w-]+/g, "") // Remove all non-word characters
146
+ .replace(/--+/g, "-") // Replace multiple - with single -
147
+ .replace(/^-+/, "") // Trim - from start of text
148
+ .replace(/-+$/, "");
149
+ }; // Trim - from end of text
150
+
151
+ var humanize = function humanize(string) {
152
+ string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
153
+ string = string.charAt(0).toUpperCase() + string.slice(1);
154
+ return string;
155
+ };
156
+ var snakeToCamelCase = function snakeToCamelCase(string) {
157
+ return string.replace(/(_\w)/g, function (letter) {
158
+ return letter[1].toUpperCase();
159
+ });
160
+ };
161
+ var camelToSnakeCase = function camelToSnakeCase(string) {
162
+ return string.replace(/[A-Z]/g, function (letter) {
163
+ return "_".concat(letter.toLowerCase());
164
+ });
165
+ };
123
166
  var capitalize = function capitalize(string) {
124
167
  return string.charAt(0).toUpperCase() + string.slice(1);
125
168
  };
169
+ nullSafe(slugify);
170
+ nullSafe(humanize);
171
+ nullSafe(snakeToCamelCase);
172
+ nullSafe(camelToSnakeCase);
173
+ nullSafe(capitalize);
126
174
 
127
175
  var matchesImpl = function matchesImpl(pattern, object) {
128
176
  var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
@@ -142,6 +190,21 @@ var matchesImpl = function matchesImpl(pattern, object) {
142
190
  var matches = /*#__PURE__*/curry(function (pattern, object) {
143
191
  return matchesImpl(pattern, object);
144
192
  });
193
+ var filterNonNull = function filterNonNull(object) {
194
+ return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
195
+ var _ref6 = _slicedToArray(_ref5, 2),
196
+ v = _ref6[1];
197
+
198
+ return !isNil(v);
199
+ }).map(function (_ref7) {
200
+ var _ref8 = _slicedToArray(_ref7, 2),
201
+ k = _ref8[0],
202
+ v = _ref8[1];
203
+
204
+ return [k, _typeof$3(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
205
+ }));
206
+ };
207
+ nullSafe(filterNonNull);
145
208
 
146
209
  function _defineProperty$1(obj, key, value) {
147
210
  if (key in obj) {
@@ -162,9 +225,6 @@ var removeBy = /*#__PURE__*/curry(function (pattern, array) {
162
225
  return array.filter(complement$1(matches(pattern)));
163
226
  });
164
227
 
165
- var noop$2 = function noop() {};
166
- var isNotEmpty = /*#__PURE__*/complement$1(isEmpty);
167
-
168
228
  var getStorageValue = function getStorageValue(key, defaultValue) {
169
229
  var saved = localStorage.getItem(key);
170
230
  return JSON.parse(saved) || defaultValue;
@@ -51451,7 +51511,7 @@ var languageLoaders = {
51451
51511
  return Promise.resolve().then(function () { return ada$2; });
51452
51512
  }),
51453
51513
  agda: createLanguageAsyncLoader("agda", function () {
51454
- return Promise.resolve().then(function () { return agda; });
51514
+ return Promise.resolve().then(function () { return agda$1; });
51455
51515
  }),
51456
51516
  al: createLanguageAsyncLoader("al", function () {
51457
51517
  return Promise.resolve().then(function () { return al$1; });
@@ -51466,7 +51526,7 @@ var languageLoaders = {
51466
51526
  return Promise.resolve().then(function () { return apex$1; });
51467
51527
  }),
51468
51528
  apl: createLanguageAsyncLoader("apl", function () {
51469
- return Promise.resolve().then(function () { return apl$1; });
51529
+ return Promise.resolve().then(function () { return apl; });
51470
51530
  }),
51471
51531
  applescript: createLanguageAsyncLoader("applescript", function () {
51472
51532
  return Promise.resolve().then(function () { return applescript$2; });
@@ -60939,45 +60999,41 @@ var ada$2 = /*#__PURE__*/_mergeNamespaces({
60939
60999
  'default': ada_1
60940
61000
  }, [ada_1]);
60941
61001
 
60942
- var agda_1;
60943
- var hasRequiredAgda;
60944
-
60945
- function requireAgda () {
60946
- if (hasRequiredAgda) return agda_1;
60947
- hasRequiredAgda = 1;
60948
-
60949
- agda_1 = agda;
60950
- agda.displayName = 'agda';
60951
- agda.aliases = [];
60952
- function agda(Prism) {
61002
+ var agda_1 = agda;
61003
+ agda.displayName = 'agda';
61004
+ agda.aliases = [];
61005
+ function agda(Prism) {
60953
61006
  (function (Prism) {
60954
- Prism.languages.agda = {
60955
- comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
60956
- string: {
60957
- pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
60958
- greedy: true
60959
- },
60960
- punctuation: /[(){}⦃⦄.;@]/,
60961
- 'class-name': {
60962
- pattern: /((?:data|record) +)\S+/,
60963
- lookbehind: true
60964
- },
60965
- function: {
60966
- pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
60967
- lookbehind: true
60968
- },
60969
- operator: {
60970
- pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
60971
- lookbehind: true
60972
- },
60973
- keyword:
60974
- /\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
60975
- };
60976
- })(Prism);
60977
- }
60978
- return agda_1;
61007
+ Prism.languages.agda = {
61008
+ comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
61009
+ string: {
61010
+ pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
61011
+ greedy: true
61012
+ },
61013
+ punctuation: /[(){}⦃⦄.;@]/,
61014
+ 'class-name': {
61015
+ pattern: /((?:data|record) +)\S+/,
61016
+ lookbehind: true
61017
+ },
61018
+ function: {
61019
+ pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
61020
+ lookbehind: true
61021
+ },
61022
+ operator: {
61023
+ pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
61024
+ lookbehind: true
61025
+ },
61026
+ keyword:
61027
+ /\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
61028
+ };
61029
+ })(Prism);
60979
61030
  }
60980
61031
 
61032
+ var agda$1 = /*#__PURE__*/_mergeNamespaces({
61033
+ __proto__: null,
61034
+ 'default': agda_1
61035
+ }, [agda_1]);
61036
+
60981
61037
  var al_1 = al;
60982
61038
  al.displayName = 'al';
60983
61039
  al.aliases = [];
@@ -61287,49 +61343,53 @@ var apex$1 = /*#__PURE__*/_mergeNamespaces({
61287
61343
  'default': apex_1
61288
61344
  }, [apex_1]);
61289
61345
 
61290
- var apl_1 = apl;
61291
- apl.displayName = 'apl';
61292
- apl.aliases = [];
61293
- function apl(Prism) {
61294
- Prism.languages.apl = {
61295
- comment: /(?:⍝|#[! ]).*$/m,
61296
- string: {
61297
- pattern: /'(?:[^'\r\n]|'')*'/,
61298
- greedy: true
61299
- },
61300
- number:
61301
- /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
61302
- statement: /:[A-Z][a-z][A-Za-z]*\b/,
61303
- 'system-function': {
61304
- pattern: /⎕[A-Z]+/i,
61305
- alias: 'function'
61306
- },
61307
- constant: /[⍬⌾#⎕⍞]/,
61308
- function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
61309
- 'monadic-operator': {
61310
- pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
61311
- alias: 'operator'
61312
- },
61313
- 'dyadic-operator': {
61314
- pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
61315
- alias: 'operator'
61316
- },
61317
- assignment: {
61318
- pattern: /←/,
61319
- alias: 'keyword'
61320
- },
61321
- punctuation: /[\[;\]()◇⋄]/,
61322
- dfn: {
61323
- pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
61324
- alias: 'builtin'
61325
- }
61326
- };
61327
- }
61346
+ var apl_1;
61347
+ var hasRequiredApl;
61328
61348
 
61329
- var apl$1 = /*#__PURE__*/_mergeNamespaces({
61330
- __proto__: null,
61331
- 'default': apl_1
61332
- }, [apl_1]);
61349
+ function requireApl () {
61350
+ if (hasRequiredApl) return apl_1;
61351
+ hasRequiredApl = 1;
61352
+
61353
+ apl_1 = apl;
61354
+ apl.displayName = 'apl';
61355
+ apl.aliases = [];
61356
+ function apl(Prism) {
61357
+ Prism.languages.apl = {
61358
+ comment: /(?:⍝|#[! ]).*$/m,
61359
+ string: {
61360
+ pattern: /'(?:[^'\r\n]|'')*'/,
61361
+ greedy: true
61362
+ },
61363
+ number:
61364
+ /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
61365
+ statement: /:[A-Z][a-z][A-Za-z]*\b/,
61366
+ 'system-function': {
61367
+ pattern: /⎕[A-Z]+/i,
61368
+ alias: 'function'
61369
+ },
61370
+ constant: /[⍬⌾#⎕⍞]/,
61371
+ function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
61372
+ 'monadic-operator': {
61373
+ pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
61374
+ alias: 'operator'
61375
+ },
61376
+ 'dyadic-operator': {
61377
+ pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
61378
+ alias: 'operator'
61379
+ },
61380
+ assignment: {
61381
+ pattern: /←/,
61382
+ alias: 'keyword'
61383
+ },
61384
+ punctuation: /[\[;\]()◇⋄]/,
61385
+ dfn: {
61386
+ pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
61387
+ alias: 'builtin'
61388
+ }
61389
+ };
61390
+ }
61391
+ return apl_1;
61392
+ }
61333
61393
 
61334
61394
  var applescript_1 = applescript$1;
61335
61395
  applescript$1.displayName = 'applescript';
@@ -84052,12 +84112,12 @@ refractor.register(abap_1);
84052
84112
  refractor.register(abnf_1);
84053
84113
  refractor.register(actionscript_1);
84054
84114
  refractor.register(ada_1);
84055
- refractor.register(requireAgda());
84115
+ refractor.register(agda_1);
84056
84116
  refractor.register(al_1);
84057
84117
  refractor.register(antlr4_1);
84058
84118
  refractor.register(apacheconf_1);
84059
84119
  refractor.register(apex_1);
84060
- refractor.register(apl_1);
84120
+ refractor.register(requireApl());
84061
84121
  refractor.register(applescript_1);
84062
84122
  refractor.register(aql_1);
84063
84123
  refractor.register(arduino_1);
@@ -87980,12 +88040,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
87980
88040
  'default': zephirExports
87981
88041
  }, [zephirExports]);
87982
88042
 
87983
- var agdaExports = requireAgda();
88043
+ var aplExports = requireApl();
87984
88044
 
87985
- var agda = /*#__PURE__*/_mergeNamespaces({
88045
+ var apl = /*#__PURE__*/_mergeNamespaces({
87986
88046
  __proto__: null,
87987
- 'default': agdaExports
87988
- }, [agdaExports]);
88047
+ 'default': aplExports
88048
+ }, [aplExports]);
87989
88049
 
87990
88050
  var avroIdlExports = requireAvroIdl();
87991
88051
 
package/utils.cjs.js CHANGED
@@ -534,6 +534,22 @@ try {
534
534
  }
535
535
  }
536
536
 
537
+ /**
538
+ * @template {Function} T
539
+ * @param {T} func
540
+ * @returns {T}
541
+ */
542
+
543
+ var nullSafe = function nullSafe(func) {
544
+ return (// @ts-ignore
545
+ ramda.curryN(func.length, function () {
546
+ var _ref;
547
+
548
+ var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
549
+ return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
550
+ })
551
+ );
552
+ };
537
553
  var getRandomInt = function getRandomInt() {
538
554
  var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
539
555
  var b = arguments.length > 1 ? arguments[1] : undefined;
@@ -559,6 +575,39 @@ function _typeof(obj) {
559
575
  }, _typeof(obj);
560
576
  }
561
577
 
578
+ var slugify = function slugify(string) {
579
+ return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
580
+ .replace(/&/g, "-and-") // Replace & with 'and'
581
+ .replace(/[^\w-]+/g, "") // Remove all non-word characters
582
+ .replace(/--+/g, "-") // Replace multiple - with single -
583
+ .replace(/^-+/, "") // Trim - from start of text
584
+ .replace(/-+$/, "");
585
+ }; // Trim - from end of text
586
+
587
+ var humanize = function humanize(string) {
588
+ string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
589
+ string = string.charAt(0).toUpperCase() + string.slice(1);
590
+ return string;
591
+ };
592
+ var snakeToCamelCase = function snakeToCamelCase(string) {
593
+ return string.replace(/(_\w)/g, function (letter) {
594
+ return letter[1].toUpperCase();
595
+ });
596
+ };
597
+ var camelToSnakeCase = function camelToSnakeCase(string) {
598
+ return string.replace(/[A-Z]/g, function (letter) {
599
+ return "_".concat(letter.toLowerCase());
600
+ });
601
+ };
602
+ var capitalize = function capitalize(string) {
603
+ return string.charAt(0).toUpperCase() + string.slice(1);
604
+ };
605
+ nullSafe(slugify);
606
+ nullSafe(humanize);
607
+ nullSafe(snakeToCamelCase);
608
+ nullSafe(camelToSnakeCase);
609
+ nullSafe(capitalize);
610
+
562
611
  var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
563
612
  var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
564
613
 
@@ -589,6 +638,21 @@ var preprocessForSerialization = function preprocessForSerialization(object) {
589
638
  return typeof (object === null || object === void 0 ? void 0 : object.toJSON) === "function" ? object.toJSON() : object;
590
639
  });
591
640
  };
641
+ var filterNonNull = function filterNonNull(object) {
642
+ return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
643
+ var _ref6 = _slicedToArray(_ref5, 2),
644
+ v = _ref6[1];
645
+
646
+ return !ramda.isNil(v);
647
+ }).map(function (_ref7) {
648
+ var _ref8 = _slicedToArray(_ref7, 2),
649
+ k = _ref8[0],
650
+ v = _ref8[1];
651
+
652
+ return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
653
+ }));
654
+ };
655
+ nullSafe(filterNonNull);
592
656
 
593
657
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
594
658
  var shams = function hasSymbols() {
package/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { values, curry, toPairs, pipe, omit, isEmpty } from 'ramda';
2
+ import { values, curryN, isNil, curry, toPairs, pipe, omit, isEmpty } from 'ramda';
3
3
  import { Toastr } from '@bigbinary/neetoui';
4
4
  import i18next from 'i18next';
5
5
  import require$$0 from 'util';
@@ -521,6 +521,22 @@ try {
521
521
  }
522
522
  }
523
523
 
524
+ /**
525
+ * @template {Function} T
526
+ * @param {T} func
527
+ * @returns {T}
528
+ */
529
+
530
+ var nullSafe = function nullSafe(func) {
531
+ return (// @ts-ignore
532
+ curryN(func.length, function () {
533
+ var _ref;
534
+
535
+ var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
536
+ return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
537
+ })
538
+ );
539
+ };
524
540
  var getRandomInt = function getRandomInt() {
525
541
  var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
526
542
  var b = arguments.length > 1 ? arguments[1] : undefined;
@@ -546,6 +562,39 @@ function _typeof(obj) {
546
562
  }, _typeof(obj);
547
563
  }
548
564
 
565
+ var slugify = function slugify(string) {
566
+ return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
567
+ .replace(/&/g, "-and-") // Replace & with 'and'
568
+ .replace(/[^\w-]+/g, "") // Remove all non-word characters
569
+ .replace(/--+/g, "-") // Replace multiple - with single -
570
+ .replace(/^-+/, "") // Trim - from start of text
571
+ .replace(/-+$/, "");
572
+ }; // Trim - from end of text
573
+
574
+ var humanize = function humanize(string) {
575
+ string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
576
+ string = string.charAt(0).toUpperCase() + string.slice(1);
577
+ return string;
578
+ };
579
+ var snakeToCamelCase = function snakeToCamelCase(string) {
580
+ return string.replace(/(_\w)/g, function (letter) {
581
+ return letter[1].toUpperCase();
582
+ });
583
+ };
584
+ var camelToSnakeCase = function camelToSnakeCase(string) {
585
+ return string.replace(/[A-Z]/g, function (letter) {
586
+ return "_".concat(letter.toLowerCase());
587
+ });
588
+ };
589
+ var capitalize = function capitalize(string) {
590
+ return string.charAt(0).toUpperCase() + string.slice(1);
591
+ };
592
+ nullSafe(slugify);
593
+ nullSafe(humanize);
594
+ nullSafe(snakeToCamelCase);
595
+ nullSafe(camelToSnakeCase);
596
+ nullSafe(capitalize);
597
+
549
598
  var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
550
599
  var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
551
600
 
@@ -576,6 +625,21 @@ var preprocessForSerialization = function preprocessForSerialization(object) {
576
625
  return typeof (object === null || object === void 0 ? void 0 : object.toJSON) === "function" ? object.toJSON() : object;
577
626
  });
578
627
  };
628
+ var filterNonNull = function filterNonNull(object) {
629
+ return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
630
+ var _ref6 = _slicedToArray(_ref5, 2),
631
+ v = _ref6[1];
632
+
633
+ return !isNil(v);
634
+ }).map(function (_ref7) {
635
+ var _ref8 = _slicedToArray(_ref7, 2),
636
+ k = _ref8[0],
637
+ v = _ref8[1];
638
+
639
+ return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
640
+ }));
641
+ };
642
+ nullSafe(filterNonNull);
579
643
 
580
644
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
581
645
  var shams = function hasSymbols() {