detect-is-it-html-or-xhtml 5.1.1 → 5.1.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/CHANGELOG.md CHANGED
@@ -65,35 +65,35 @@ Accidental version bump during migration to sourcehut. Sorry about that.
65
65
 
66
66
  ## 3.9.0 (2019-01-20)
67
67
 
68
- - Various documentation and setup tweaks after we migrated to monorepo
69
- - Setup refresh: updated dependencies and all config files using automated tools
68
+ - Various documentation and setup tweaks after we migrated to monorepo
69
+ - Setup refresh: updated dependencies and all config files using automated tools
70
70
 
71
71
  ## 3.3.0 (2018-10-17)
72
72
 
73
- - Updated all dependencies
74
- - Restored unit test coverage tracking: reporting in terminal and coveralls.io
75
- - Restored unit test linting
73
+ - Updated all dependencies
74
+ - Restored unit test coverage tracking: reporting in terminal and coveralls.io
75
+ - Restored unit test linting
76
76
 
77
77
  ## 3.2.0 (2018-06-11)
78
78
 
79
79
  GitHub sold us out. In the meantime, we:
80
80
 
81
- - Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
82
- - Dropped BitHound (RIP) and Travis
83
- - Removed `package-lock`
81
+ - Migrated to BitBucket (to host repo + perform CI) and Codacy (for code quality audit)
82
+ - Dropped BitHound (RIP) and Travis
83
+ - Removed `package-lock`
84
84
 
85
85
  ## 3.1.0 (2018-05-03)
86
86
 
87
- - Set up [Prettier](https://prettier.io)
88
- - Removed `package.lock` and `.editorconfig`
89
- - Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove from production code.
87
+ - Set up [Prettier](https://prettier.io)
88
+ - Removed `package.lock` and `.editorconfig`
89
+ - Wired Rollup to remove comments from non-dev builds. This means we can now leave the `console.log`s in the source code — Rollup will remove from production code.
90
90
 
91
91
  ## 3.0.0 (2017-12-09)
92
92
 
93
- - Rebased in ES node_modules
94
- - Set up the Rollup (nice rhyming). Now we generate CommonJS, UMD and ES Module (native code) builds.
95
- - Set up raw ESLint on `airbnb-base` preset with semicolons off. Also linting for AVA unit tests.
93
+ - Rebased in ES node_modules
94
+ - Set up the Rollup (nice rhyming). Now we generate CommonJS, UMD and ES Module (native code) builds.
95
+ - Set up raw ESLint on `airbnb-base` preset with semicolons off. Also linting for AVA unit tests.
96
96
 
97
97
  ## 2.0.0 (2017-03-02)
98
98
 
99
- - In order to prevent accidental input argument mutation when object is given, now we're throwing a type error when the input argument is present, but of a wrong type. That's enough to warrant a major API change under semver.
99
+ - In order to prevent accidental input argument mutation when object is given, now we're throwing a type error when the input argument is present, but of a wrong type. That's enough to warrant a major API change under semver.
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name detect-is-it-html-or-xhtml
3
3
  * @fileoverview Does the string resemble an HTML or XHTML (or neither)?
4
- * @version 5.1.1
4
+ * @version 5.1.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 i="5.1.1";var T=i;function b(t){function o(e){return e!=null}if(!t)return null;if(typeof t!="string")throw new TypeError(`detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be a string! It was given as ${JSON.stringify(t,null,4)} (type ${typeof t})`);let c=/<\s*!\s*doctype[^>]*>/im,a=/<\s*img[^>]*>/gi,m=/<\s*br[^>]*>/gi,d=/<\s*hr[^>]*>/gi,h=/\/\s*>/g,s=t.match(c);if(s){let e=/xhtml/gi,l=/svg/gi;return s[0].match(e)||s[0].match(l)?"xhtml":"html"}let p=t.match(a)||[],u=t.match(m)||[],g=t.match(d)||[],r=p.concat(u).concat(g);if(r.length===0)return null;let n=0;for(let e=0,l=r.length;e<l;e++)o(r[e].match(h))&&(n+=1);return n>r.length/2?"xhtml":"html"}export{b as detectIsItHTMLOrXhtml,T as version};
10
+ var i="5.1.2";var T=i;function b(t){function o(e){return e!=null}if(!t)return null;if(typeof t!="string")throw new TypeError(`detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be a string! It was given as ${JSON.stringify(t,null,4)} (type ${typeof t})`);let c=/<\s*!\s*doctype[^>]*>/im,a=/<\s*img[^>]*>/gi,m=/<\s*br[^>]*>/gi,d=/<\s*hr[^>]*>/gi,h=/\/\s*>/g,s=t.match(c);if(s){let e=/xhtml/gi,l=/svg/gi;return s[0].match(e)||s[0].match(l)?"xhtml":"html"}let p=t.match(a)||[],u=t.match(m)||[],g=t.match(d)||[],r=p.concat(u).concat(g);if(r.length===0)return null;let n=0;for(let e=0,l=r.length;e<l;e++)o(r[e].match(h))&&(n+=1);return n>r.length/2?"xhtml":"html"}export{b as detectIsItHTMLOrXhtml,T as version};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name detect-is-it-html-or-xhtml
3
3
  * @fileoverview Does the string resemble an HTML or XHTML (or neither)?
4
- * @version 5.1.1
4
+ * @version 5.1.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
- "use strict";var detectIsItHtmlOrXhtml=(()=>{var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var l in e)a(t,l,{get:e[l],enumerable:!0})},v=(t,e,l,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of f(e))!T.call(t,r)&&r!==l&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var j=t=>v(a({},"__esModule",{value:!0}),t);var M={};b(M,{detectIsItHTMLOrXhtml:()=>I,version:()=>w});var d="5.1.1";var w=d;function I(t){function e(s){return s!=null}if(!t)return null;if(typeof t!="string")throw new TypeError(`detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be a string! It was given as ${JSON.stringify(t,null,4)} (type ${typeof t})`);let l=/<\s*!\s*doctype[^>]*>/im,n=/<\s*img[^>]*>/gi,r=/<\s*br[^>]*>/gi,h=/<\s*hr[^>]*>/gi,p=/\/\s*>/g,o=t.match(l);if(o){let s=/xhtml/gi,c=/svg/gi;return o[0].match(s)||o[0].match(c)?"xhtml":"html"}let u=t.match(n)||[],g=t.match(r)||[],y=t.match(h)||[],i=u.concat(g).concat(y);if(i.length===0)return null;let m=0;for(let s=0,c=i.length;s<c;s++)e(i[s].match(p))&&(m+=1);return m>i.length/2?"xhtml":"html"}return j(M);})();
10
+ "use strict";var detectIsItHtmlOrXhtml=(()=>{var a=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var b=(t,e)=>{for(var l in e)a(t,l,{get:e[l],enumerable:!0})},v=(t,e,l,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of f(e))!T.call(t,r)&&r!==l&&a(t,r,{get:()=>e[r],enumerable:!(n=x(e,r))||n.enumerable});return t};var j=t=>v(a({},"__esModule",{value:!0}),t);var M={};b(M,{detectIsItHTMLOrXhtml:()=>I,version:()=>w});var d="5.1.2";var w=d;function I(t){function e(s){return s!=null}if(!t)return null;if(typeof t!="string")throw new TypeError(`detect-is-it-html-or-xhtml: [THROW_ID_01] Input must be a string! It was given as ${JSON.stringify(t,null,4)} (type ${typeof t})`);let l=/<\s*!\s*doctype[^>]*>/im,n=/<\s*img[^>]*>/gi,r=/<\s*br[^>]*>/gi,h=/<\s*hr[^>]*>/gi,p=/\/\s*>/g,o=t.match(l);if(o){let s=/xhtml/gi,c=/svg/gi;return o[0].match(s)||o[0].match(c)?"xhtml":"html"}let u=t.match(n)||[],g=t.match(r)||[],y=t.match(h)||[],i=u.concat(g).concat(y);if(i.length===0)return null;let m=0;for(let s=0,c=i.length;s<c;s++)e(i[s].match(p))&&(m+=1);return m>i.length/2?"xhtml":"html"}return j(M);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "detect-is-it-html-or-xhtml",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "Does the string resemble an HTML or XHTML (or neither)?",
5
5
  "keywords": [
6
6
  "check",