detect-is-it-html-or-xhtml 5.0.1 → 5.0.2

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/README.md CHANGED
@@ -32,7 +32,7 @@ This package is ESM only: Node 12+ is needed to use it and it must be imported i
32
32
  npm i detect-is-it-html-or-xhtml
33
33
  ```
34
34
 
35
- If you need a legacy version which works with require, use version 4.1.0
35
+ If you need a legacy version which works with `require`, use version 4.1.0
36
36
 
37
37
  ## Quick Take
38
38
 
@@ -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.1
4
+ * @version 5.0.2
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.1";
10
+ var version$1 = "5.0.2";
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.1
4
+ * @version 5.0.2
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.1",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.2",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.1",
3
+ "version": "5.0.2",
4
4
  "description": "Answers, is the string input string more an HTML or XHTML (or neither)",
5
5
  "keywords": [
6
6
  "check",
@@ -112,7 +112,7 @@
112
112
  "core-js": "^3.17.3",
113
113
  "cross-env": "^7.0.3",
114
114
  "eslint": "^7.32.0",
115
- "lect": "^0.18.1",
115
+ "lect": "^0.18.2",
116
116
  "rollup": "^2.56.3",
117
117
  "rollup-plugin-ascii": "^0.0.3",
118
118
  "rollup-plugin-banner": "^0.2.1",