detect-is-it-html-or-xhtml 5.0.6 → 5.0.7

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,13 +1,13 @@
1
1
  /**
2
2
  * @name detect-is-it-html-or-xhtml
3
3
  * @fileoverview Answers, is the string input string more an HTML or XHTML (or neither)
4
- * @version 5.0.6
4
+ * @version 5.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/detect-is-it-html-or-xhtml/}
8
8
  */
9
9
 
10
- var version$1 = "5.0.6";
10
+ var version$1 = "5.0.7";
11
11
 
12
12
  const version = version$1;
13
13
  function detectIsItHTMLOrXhtml(input) {
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name detect-is-it-html-or-xhtml
3
3
  * @fileoverview Answers, is the string input string more an HTML or XHTML (or neither)
4
- * @version 5.0.6
4
+ * @version 5.0.7
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/detect-is-it-html-or-xhtml/}
8
8
  */
9
9
 
10
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).detectIsItHtmlOrXhtml={})}(this,(function(t){"use strict";t.detectIsItHTMLOrXhtml=function(t){if(!t)return null;if("string"!=typeof t)throw new TypeError("detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be string");const e=/\/\s*>/g,n=t.match(/<\s*!\s*doctype[^>]*>/im);if(n){const t=/svg/gi;return n[0].match(/xhtml/gi)||n[0].match(t)?"xhtml":"html"}const i=t.match(/<\s*img[^>]*>/gi)||[],l=t.match(/<\s*br[^>]*>/gi)||[],o=t.match(/<\s*hr[^>]*>/gi)||[],r=i.concat(l).concat(o);if(0===r.length)return null;let s=0;for(let t=0,n=r.length;t<n;t++)null!=r[t].match(e)&&(s+=1);return s>r.length/2?"xhtml":"html"},t.version="5.0.6",Object.defineProperty(t,"__esModule",{value:!0})}));
10
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).detectIsItHtmlOrXhtml={})}(this,(function(t){"use strict";t.detectIsItHTMLOrXhtml=function(t){if(!t)return null;if("string"!=typeof t)throw new TypeError("detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be string");const e=/\/\s*>/g,n=t.match(/<\s*!\s*doctype[^>]*>/im);if(n){const t=/svg/gi;return n[0].match(/xhtml/gi)||n[0].match(t)?"xhtml":"html"}const i=t.match(/<\s*img[^>]*>/gi)||[],l=t.match(/<\s*br[^>]*>/gi)||[],o=t.match(/<\s*hr[^>]*>/gi)||[],r=i.concat(l).concat(o);if(0===r.length)return null;let s=0;for(let t=0,n=r.length;t<n;t++)null!=r[t].match(e)&&(s+=1);return s>r.length/2?"xhtml":"html"},t.version="5.0.7",Object.defineProperty(t,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-is-it-html-or-xhtml",
3
- "version": "5.0.6",
3
+ "version": "5.0.7",
4
4
  "description": "Answers, is the string input string more an HTML or XHTML (or neither)",
5
5
  "keywords": [
6
6
  "check",
@@ -101,21 +101,21 @@
101
101
  "@rollup/plugin-node-resolve": "^13.0.6",
102
102
  "@rollup/plugin-strip": "^2.1.0",
103
103
  "@rollup/plugin-typescript": "^8.3.0",
104
- "@types/node": "^16.11.9",
104
+ "@types/node": "^16.11.10",
105
105
  "@types/tap": "^15.0.5",
106
- "@typescript-eslint/eslint-plugin": "^5.4.0",
107
- "@typescript-eslint/parser": "^5.4.0",
108
- "core-js": "^3.19.1",
106
+ "@typescript-eslint/eslint-plugin": "^5.5.0",
107
+ "@typescript-eslint/parser": "^5.5.0",
108
+ "core-js": "^3.19.2",
109
109
  "cross-env": "^7.0.3",
110
110
  "eslint": "^8.3.0",
111
- "lect": "^0.18.6",
112
- "rollup": "^2.60.0",
111
+ "lect": "^0.18.7",
112
+ "rollup": "^2.60.1",
113
113
  "rollup-plugin-ascii": "^0.0.3",
114
114
  "rollup-plugin-banner": "^0.2.1",
115
115
  "rollup-plugin-cleanup": "^3.2.1",
116
116
  "rollup-plugin-dts": "^4.0.1",
117
117
  "rollup-plugin-terser": "^7.0.2",
118
- "tap": "^15.1.2",
118
+ "tap": "^15.1.5",
119
119
  "tslib": "^2.3.1",
120
120
  "typescript": "^4.5.2"
121
121
  },