html-react-parser 4.2.7 → 4.2.8

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/lib/utilities.js CHANGED
@@ -1,41 +1,6 @@
1
1
  var React = require('react');
2
2
  var styleToJS = require('style-to-js').default;
3
3
 
4
- /**
5
- * Swap key with value in an object.
6
- *
7
- * @param {object} obj - The object.
8
- * @param {Function} [override] - The override method.
9
- * @returns - The inverted object.
10
- */
11
- function invertObject(obj, override) {
12
- if (!obj || typeof obj !== 'object') {
13
- throw new TypeError('First argument must be an object');
14
- }
15
-
16
- var isOverridePresent = typeof override === 'function';
17
- var overrides = {};
18
- var result = {};
19
-
20
- for (var key in obj) {
21
- var value = obj[key];
22
-
23
- if (isOverridePresent) {
24
- overrides = override(key, value);
25
- if (overrides && overrides.length === 2) {
26
- result[overrides[0]] = overrides[1];
27
- continue;
28
- }
29
- }
30
-
31
- if (typeof value === 'string') {
32
- result[value] = key;
33
- }
34
- }
35
-
36
- return result;
37
- }
38
-
39
4
  var RESERVED_SVG_MATHML_ELEMENTS = new Set([
40
5
  'annotation-xml',
41
6
  'color-profile',
@@ -133,7 +98,6 @@ function returnFirstArg(arg) {
133
98
  module.exports = {
134
99
  PRESERVE_CUSTOM_ATTRIBUTES: PRESERVE_CUSTOM_ATTRIBUTES,
135
100
  ELEMENTS_WITH_NO_TEXT_CHILDREN: ELEMENTS_WITH_NO_TEXT_CHILDREN,
136
- invertObject: invertObject,
137
101
  isCustomComponent: isCustomComponent,
138
102
  setStyleProp: setStyleProp,
139
103
  canTextBeChildOfNode: canTextBeChildOfNode,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-react-parser",
3
- "version": "4.2.7",
3
+ "version": "4.2.8",
4
4
  "description": "HTML to React parser.",
5
5
  "author": "Mark <mark@remarkablemark.org>",
6
6
  "main": "index.js",
@@ -62,7 +62,7 @@
62
62
  "@rollup/plugin-node-resolve": "15.2.3",
63
63
  "@rollup/plugin-terser": "0.4.4",
64
64
  "@size-limit/preset-big-lib": "9.0.0",
65
- "@types/react": "18.2.29",
65
+ "@types/react": "18.2.30",
66
66
  "@typescript-eslint/parser": "6.8.0",
67
67
  "benchmark": "2.1.4",
68
68
  "eslint": "8.51.0",
@@ -70,7 +70,7 @@
70
70
  "husky": "8.0.3",
71
71
  "jest": "29.7.0",
72
72
  "jest-environment-jsdom": "29.7.0",
73
- "lint-staged": "15.0.1",
73
+ "lint-staged": "15.0.2",
74
74
  "pinst": "3.0.0",
75
75
  "preact": "10.18.1",
76
76
  "react": "18.2.0",