is-html-tag-opening 4.0.13 → 4.0.15

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,12 +1,12 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.13
4
+ * @version 4.0.15
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- import{matchRight as N,matchRightIncl as x}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.13";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
- `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]&&s[1].trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||D.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]&&s[1].trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||y.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&x(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]&&e[t+1].trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
- `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]&&e[t+1].trim()&&N(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
10
+ import{matchRight as x,matchRightIncl as N}from"string-match-left-right";import{left as c}from"string-left-right";var d={allowCustomTagNames:!1,skipOpeningBracket:!1},m="\\",g=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function b(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}import{left as T}from"string-left-right";function p(e,t){return e[t]==="<"||e[T(e,t)]==="<"}var f="4.0.15";var K=f;function U(e,t=0,h){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let n={...d,...h},i="[\\\\ \\t\\r\\n/]*",r="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",w=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+${i}\\/?${i}>`,"g"),k=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*${i}>`,"g"),E=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),D=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${r}]+[-${r}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),y=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),O=new RegExp(`^<${n.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${r}]+[-${r}]*\\s*\\/?\\s*>`,"g"),R=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),v=new RegExp(`^<${n.skipOpeningBracket?"?":""}${i}[${r}]+[-${r}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),$=new RegExp(`^<${n.skipOpeningBracket?"?\\/?":""}(${i}[${r}]+)+${i}[\\\\/=>]`,""),V=new RegExp("^\\/\\s*\\w+s*>"),s=t?e.slice(t):e,a=c(e,t),l=!1,o=!1,B={cb:b,i:!0,trimCharsBeforeMatching:["/",m,"!"," "," ",`
11
+ `,"\r"]};return n.allowCustomTagNames?((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||s[0]==="<"&&s[1]?.trim())&&($.test(s)||/^<\w+$/.test(s))||k.test(s)&&p(e,t)||D.test(s)||O.test(s)&&p(e,t)||v.test(s)||e[t]==="/"&&e[a]!=="<"&&V.test(s))&&(o=!0):(((n.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[c(e,a)]==="<")||(s[0]==="<"||s[0]==="/"&&(!e[a]||e[a]!=="<"))&&s[1]?.trim())&&$.test(s)||w.test(s)&&p(e,t)||E.test(s)||y.test(s)&&p(e,t)||R.test(s))&&(l=!0),l&&N(e,t,g,{cb:u=>u===void 0?((e[t]==="<"&&e[t+1]?.trim()||e[t-1]==="<")&&(o=!0),!0):u.toUpperCase()===u.toLowerCase()&&!/\d/.test(u)&&u!=="=",i:!0,trimCharsBeforeMatching:["<","/",m,"!"," "," ",`
12
+ `,"\r"]})&&(o=!0)),!o&&e[t]==="<"&&e[t+1]?.trim()&&x(e,t,g,B)&&(o=!0),typeof e=="string"&&t<e.length&&o}export{d as defaults,U as isOpening,K as version};
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * @name is-html-tag-opening
3
3
  * @fileoverview Does an HTML tag start at given position?
4
- * @version 4.0.13
4
+ * @version 4.0.15
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/is-html-tag-opening/}
8
8
  */
9
9
 
10
- "use strict";var isHtmlTagOpening=(()=>{var Y=Object.create;var E=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var ee=Object.getOwnPropertyNames,I=Object.getOwnPropertySymbols,te=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable;var V=(e,t,s)=>t in e?E(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,v=(e,t)=>{for(var s in t||(t={}))k.call(t,s)&&V(e,s,t[s]);if(I)for(var s of I(t))re.call(t,s)&&V(e,s,t[s]);return e};var ne=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ie=(e,t)=>{for(var s in t)E(e,s,{get:t[s],enumerable:!0})},F=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ee(t))!k.call(e,n)&&n!==s&&E(e,n,{get:()=>t[n],enumerable:!(o=X(t,n))||o.enumerable});return e};var _=(e,t,s)=>(s=e!=null?Y(te(e)):{},F(t||!e||!e.__esModule?E(s,"default",{value:e,enumerable:!0}):s,e)),se=e=>F(E({},"__esModule",{value:!0}),e);var L=ne((be,W)=>{"use strict";W.exports=ae;function M(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function ae(e){if(e=e||{},e.circles)return oe(e);return e.proto?o:s;function t(n,a){for(var i=Object.keys(n),r=new Array(i.length),u=0;u<i.length;u++){var l=i[u],g=n[l];typeof g!="object"||g===null?r[l]=g:g instanceof Date?r[l]=new Date(g):ArrayBuffer.isView(g)?r[l]=M(g):r[l]=a(g)}return r}function s(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,s);if(n instanceof Map)return new Map(t(Array.from(n),s));if(n instanceof Set)return new Set(t(Array.from(n),s));var a={};for(var i in n)if(Object.hasOwnProperty.call(n,i)!==!1){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),s)):r instanceof Set?a[i]=new Set(t(Array.from(r),s)):ArrayBuffer.isView(r)?a[i]=M(r):a[i]=s(r)}return a}function o(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,o);if(n instanceof Map)return new Map(t(Array.from(n),o));if(n instanceof Set)return new Set(t(Array.from(n),o));var a={};for(var i in n){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),o)):r instanceof Set?a[i]=new Set(t(Array.from(r),o)):ArrayBuffer.isView(r)?a[i]=M(r):a[i]=o(r)}return a}}function oe(e){var t=[],s=[];return e.proto?a:n;function o(i,r){for(var u=Object.keys(i),l=new Array(u.length),g=0;g<u.length;g++){var b=u[g],m=i[b];if(typeof m!="object"||m===null)l[b]=m;else if(m instanceof Date)l[b]=new Date(m);else if(ArrayBuffer.isView(m))l[b]=M(m);else{var h=t.indexOf(m);h!==-1?l[b]=s[h]:l[b]=r(m)}}return l}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,n);if(i instanceof Map)return new Map(o(Array.from(i),n));if(i instanceof Set)return new Set(o(Array.from(i),n));var r={};t.push(i),s.push(r);for(var u in i)if(Object.hasOwnProperty.call(i,u)!==!1){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),n));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),n));else if(ArrayBuffer.isView(l))r[u]=M(l);else{var g=t.indexOf(l);g!==-1?r[u]=s[g]:r[u]=n(l)}}return t.pop(),s.pop(),r}function a(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,a);if(i instanceof Map)return new Map(o(Array.from(i),a));if(i instanceof Set)return new Set(o(Array.from(i),a));var r={};t.push(i),s.push(r);for(var u in i){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),a));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),a));else if(ArrayBuffer.isView(l))r[u]=M(l);else{var g=t.indexOf(l);g!==-1?r[u]=s[g]:r[u]=a(l)}}return t.pop(),s.pop(),r}}});var ge={};ie(ge,{defaults:()=>x,isOpening:()=>pe,version:()=>me});function q(e){return typeof e!="string"?e:e.length?[e]:[]}var H=_(L(),1);var ye=(0,H.default)();function B(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function P(e,t){return B(e)&&C(t)&&t in e}var J={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},le=e=>e+1;function ue(e,t,s,o,n=!1,a=le){let i=typeof s=="function"?s():s;if(+t<0&&n&&i==="EOL")return i;let r=v(v({},J),o);if(t>=e.length&&!n)return!1;let u=n?1:s.length,l=0,g=!1,b=!1,m=!1,h=r.maxMismatches,f=t,w=!1,c=!1,y=!1;function d(){return l===1&&h<r.maxMismatches-1}for(;e[f];){let p=a(f);if(r.trimBeforeMatching&&e[f].trim()===""){if(!e[p]&&n&&s==="EOL")return!0;f=a(f);continue}if(r&&!r.i&&r.trimCharsBeforeMatching&&r.trimCharsBeforeMatching.includes(e[f])||r!=null&&r.i&&r.trimCharsBeforeMatching&&r.trimCharsBeforeMatching.map(D=>D.toLowerCase()).includes(e[f].toLowerCase())){if(n&&s==="EOL"&&!e[p])return!0;f=a(f);continue}let A=p>f?s[s.length-u]:s[u-1];if(!r.i&&e[f]===A||r.i&&e[f].toLowerCase()===A.toLowerCase()){if(w||(w=!0),m||(m=!0),u===s.length){if(c=!0,h!==r.maxMismatches)return!1}else u===1&&(y=!0);if(u-=1,l++,d())return!1;if(!u)return l!==s.length||h===r.maxMismatches||!g?f:!1}else if(!g&&!l&&(g=!0),r.maxMismatches&&h&&f){h-=1;for(let D=0;D<=h;D++){let $=p>f?s[s.length-u+1+D]:s[u-2-D],S=e[a(f)];if($&&(!r.i&&e[f]===$||r.i&&e[f].toLowerCase()===$.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(l++,d())return!1;u-=2,w=!0;break}else if(S&&$&&(!r.i&&S===$||r.i&&S.toLowerCase()===$.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(!l&&!r.hungry)return!1;u-=1,w=!0;break}else if($===void 0&&h>=0&&w&&(!r.firstMustMatch||c)&&(!r.lastMustMatch||y))return f}w||(b=f)}else return f===0&&u===1&&!r.lastMustMatch&&m?0:!1;if(b!==!1&&b!==f&&(b=!1),u<1)return f;f=a(f)}if(u>0)return n&&i==="EOL"?!0:r&&r.maxMismatches>=u&&m?b||0:!1}function U(e,t,s,o,n){var g,b;if(B(n)&&P(n,"trimBeforeMatching")&&n&&typeof n.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(n.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let a=v(v({},J),n);if(typeof a.trimCharsBeforeMatching=="string"&&(a.trimCharsBeforeMatching=q(a.trimCharsBeforeMatching)),a.trimCharsBeforeMatching=a.trimCharsBeforeMatching.map(m=>C(m)?m:String(m)),!C(t)||!t.length)return!1;if(!Number.isInteger(s)||s<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof s}, equal to:
10
+ "use strict";var isHtmlTagOpening=(()=>{var te=Object.create;var R=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ne=Object.getOwnPropertyNames,F=Object.getOwnPropertySymbols,ie=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable;var _=(e,t,s)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,v=(e,t)=>{for(var s in t||(t={}))q.call(t,s)&&_(e,s,t[s]);if(F)for(var s of F(t))se.call(t,s)&&_(e,s,t[s]);return e};var ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oe=(e,t)=>{for(var s in t)R(e,s,{get:t[s],enumerable:!0})},W=(e,t,s,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ne(t))!q.call(e,n)&&n!==s&&R(e,n,{get:()=>t[n],enumerable:!(o=re(t,n))||o.enumerable});return e};var H=(e,t,s)=>(s=e!=null?te(ie(e)):{},W(t||!e||!e.__esModule?R(s,"default",{value:e,enumerable:!0}):s,e)),le=e=>W(R({},"__esModule",{value:!0}),e);var N=ae(($e,J)=>{"use strict";J.exports=ue;function O(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function ue(e){if(e=e||{},e.circles)return fe(e);return e.proto?o:s;function t(n,a){for(var i=Object.keys(n),r=new Array(i.length),u=0;u<i.length;u++){var l=i[u],g=n[l];typeof g!="object"||g===null?r[l]=g:g instanceof Date?r[l]=new Date(g):ArrayBuffer.isView(g)?r[l]=O(g):r[l]=a(g)}return r}function s(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,s);if(n instanceof Map)return new Map(t(Array.from(n),s));if(n instanceof Set)return new Set(t(Array.from(n),s));var a={};for(var i in n)if(Object.hasOwnProperty.call(n,i)!==!1){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),s)):r instanceof Set?a[i]=new Set(t(Array.from(r),s)):ArrayBuffer.isView(r)?a[i]=O(r):a[i]=s(r)}return a}function o(n){if(typeof n!="object"||n===null)return n;if(n instanceof Date)return new Date(n);if(Array.isArray(n))return t(n,o);if(n instanceof Map)return new Map(t(Array.from(n),o));if(n instanceof Set)return new Set(t(Array.from(n),o));var a={};for(var i in n){var r=n[i];typeof r!="object"||r===null?a[i]=r:r instanceof Date?a[i]=new Date(r):r instanceof Map?a[i]=new Map(t(Array.from(r),o)):r instanceof Set?a[i]=new Set(t(Array.from(r),o)):ArrayBuffer.isView(r)?a[i]=O(r):a[i]=o(r)}return a}}function fe(e){var t=[],s=[];return e.proto?a:n;function o(i,r){for(var u=Object.keys(i),l=new Array(u.length),g=0;g<u.length;g++){var b=u[g],p=i[b];if(typeof p!="object"||p===null)l[b]=p;else if(p instanceof Date)l[b]=new Date(p);else if(ArrayBuffer.isView(p))l[b]=O(p);else{var h=t.indexOf(p);h!==-1?l[b]=s[h]:l[b]=r(p)}}return l}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,n);if(i instanceof Map)return new Map(o(Array.from(i),n));if(i instanceof Set)return new Set(o(Array.from(i),n));var r={};t.push(i),s.push(r);for(var u in i)if(Object.hasOwnProperty.call(i,u)!==!1){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),n));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),n));else if(ArrayBuffer.isView(l))r[u]=O(l);else{var g=t.indexOf(l);g!==-1?r[u]=s[g]:r[u]=n(l)}}return t.pop(),s.pop(),r}function a(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return o(i,a);if(i instanceof Map)return new Map(o(Array.from(i),a));if(i instanceof Set)return new Set(o(Array.from(i),a));var r={};t.push(i),s.push(r);for(var u in i){var l=i[u];if(typeof l!="object"||l===null)r[u]=l;else if(l instanceof Date)r[u]=new Date(l);else if(l instanceof Map)r[u]=new Map(o(Array.from(l),a));else if(l instanceof Set)r[u]=new Set(o(Array.from(l),a));else if(ArrayBuffer.isView(l))r[u]=O(l);else{var g=t.indexOf(l);g!==-1?r[u]=s[g]:r[u]=a(l)}}return t.pop(),s.pop(),r}}});var be={};oe(be,{defaults:()=>j,isOpening:()=>de,version:()=>he});function P(e){return typeof e!="string"?e:e.length?[e]:[]}var U=H(N(),1);var ve=(0,U.default)();function S(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function C(e){return typeof e=="string"}function Q(e,t){return S(e)&&C(t)&&t in e}var K={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},ce=e=>e+1;function me(e,t,s,o,n=!1,a=ce){let i=typeof s=="function"?s():s;if(+t<0&&n&&i==="EOL")return i;let r=v(v({},K),o);if(t>=e.length&&!n)return!1;let u=n?1:s.length,l=0,g=!1,b=!1,p=!1,h=r.maxMismatches,f=t,w=!1,c=!1,y=!1;function d(){return l===1&&h<r.maxMismatches-1}for(;e[f];){let m=a(f);if(r.trimBeforeMatching&&e[f].trim()===""){if(!e[m]&&n&&s==="EOL")return!0;f=a(f);continue}if(r&&!r.i&&r.trimCharsBeforeMatching&&r.trimCharsBeforeMatching.includes(e[f])||r!=null&&r.i&&r.trimCharsBeforeMatching&&r.trimCharsBeforeMatching.map(D=>D.toLowerCase()).includes(e[f].toLowerCase())){if(n&&s==="EOL"&&!e[m])return!0;f=a(f);continue}let A=m>f?s[s.length-u]:s[u-1];if(!r.i&&e[f]===A||r.i&&e[f].toLowerCase()===A.toLowerCase()){if(w||(w=!0),p||(p=!0),u===s.length){if(c=!0,h!==r.maxMismatches)return!1}else u===1&&(y=!0);if(u-=1,l++,d())return!1;if(!u)return l!==s.length||h===r.maxMismatches||!g?f:!1}else if(!g&&!l&&(g=!0),r.maxMismatches&&h&&f){h-=1;for(let D=0;D<=h;D++){let $=m>f?s[s.length-u+1+D]:s[u-2-D],M=e[a(f)];if($&&(!r.i&&e[f]===$||r.i&&e[f].toLowerCase()===$.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(l++,d())return!1;u-=2,w=!0;break}else if(M&&$&&(!r.i&&M===$||r.i&&M.toLowerCase()===$.toLowerCase())&&(!r.firstMustMatch||u!==s.length)){if(!l&&!r.hungry)return!1;u-=1,w=!0;break}else if($===void 0&&h>=0&&w&&(!r.firstMustMatch||c)&&(!r.lastMustMatch||y))return f}w||(b=f)}else return f===0&&u===1&&!r.lastMustMatch&&p?0:!1;if(b!==!1&&b!==f&&(b=!1),u<1)return f;f=a(f)}if(u>0)return n&&i==="EOL"?!0:r&&r.maxMismatches>=u&&p?b||0:!1}function z(e,t,s,o,n){var g,b;if(S(n)&&Q(n,"trimBeforeMatching")&&n&&typeof n.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(n.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let a=v(v({},K),n);if(typeof a.trimCharsBeforeMatching=="string"&&(a.trimCharsBeforeMatching=P(a.trimCharsBeforeMatching)),a.trimCharsBeforeMatching=a.trimCharsBeforeMatching.map(p=>C(p)?p:String(p)),!C(t)||!t.length)return!1;if(!Number.isInteger(s)||s<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof s}, equal to:
11
11
  ${JSON.stringify(s,null,4)}`);let i,r;if(C(o))i=[o];else if(Array.isArray(o))i=o;else if(!o)i=o;else if(typeof o=="function")i=[],i.push(o);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof o}, equal to:
12
- ${JSON.stringify(o,null,4)}`);if(n&&!B(n))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof n}", and equal to:
13
- ${JSON.stringify(n,null,4)}`);let u=0,l="";if(a!=null&&a.trimCharsBeforeMatching&&a.trimCharsBeforeMatching.some((m,h)=>m.length>1?(u=h,l=m,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${l.length} (equals to ${l}). Please split it into separate characters and put into array as separate elements.`);if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof a.cb=="function"){let h,f=s;if((e==="matchLeftIncl"||e==="matchRight")&&(f+=1),e[5]==="L")for(let d=f;d--;){let p=t[d];if((!a.trimBeforeMatching||a.trimBeforeMatching&&p!==void 0&&p.trim())&&(!((g=a.trimCharsBeforeMatching)!=null&&g.length)||p!==void 0&&!a.trimCharsBeforeMatching.includes(p))){h=d;break}}else if(e.startsWith("matchRight"))for(let d=f;d<t.length;d++){let p=t[d];if((!a.trimBeforeMatching||a.trimBeforeMatching&&p.trim())&&(!((b=a.trimCharsBeforeMatching)!=null&&b.length)||!a.trimCharsBeforeMatching.includes(p))){h=d;break}}if(h===void 0)return!1;let w=t[h],c=h+1,y="";return c&&c>0&&(y=t.slice(0,c)),e[5]==="L"||h&&h>0&&(y=t.slice(h)),a.cb(w,y,h)}let m="";throw n||(m=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${m}`)}for(let m=0,h=i.length;m<h;m++){r=typeof i[m]=="function";let f=i[m],w,c,y="",d=s;e==="matchRight"?d+=1:e==="matchLeft"&&(d-=1);let p=ue(t,d,f,a,r,A=>e[5]==="L"?A-1:A+1);if(p&&r&&typeof f=="function"&&f()==="EOL")return f()&&(!a.cb||a.cb(w,y,c))?f():!1;if(Number.isInteger(p)&&(c=e.startsWith("matchLeft")?p-1:p+1,e[5]==="L"?y=t.slice(0,p):y=t.slice(c)),c<0&&(c=void 0),t[c]&&(w=t[c]),Number.isInteger(p)&&(!a.cb||a.cb(w,y,c)))return f}return!1}function Q(e,t,s,o){return U("matchRightIncl",e,t,s,o)}function K(e,t,s,o){return U("matchRight",e,t,s,o)}var z=_(L(),1);var Oe=(0,z.default)();var N="\xA0";function fe({str:e,idx:t,stopAtNewlines:s,stopAtRawNbsp:o}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||s&&`
14
- \r`.includes(e[~-t])||o&&e[~-t]===N))return~-t;if(e[t-2]&&(e[t-2].trim()||s&&`
15
- \r`.includes(e[t-2])||o&&e[t-2]===N))return t-2;for(let n=t;n--;)if(e[n]&&(e[n].trim()||s&&`
16
- \r`.includes(e[n])||o&&e[n]===N))return n;return null}function O(e,t=0){return fe({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var x={allowCustomTagNames:!1,skipOpeningBracket:!1},j="\\",T=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function G(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function R(e,t){return e[t]==="<"||e[O(e,t)]==="<"}var Z="4.0.13";var me=Z;function pe(e,t=0,s){if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let o=v(v({},x),s),n="[\\\\ \\t\\r\\n/]*",a="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+${n}\\/?${n}>`,"g"),r=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*${n}>`,"g"),u=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),l=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${a}]+[-${a}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),g=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),b=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${a}]+[-${a}]*\\s*\\/?\\s*>`,"g"),m=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),h=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${o.skipOpeningBracket?"?\\/?":""}(${n}[${a}]+)+${n}[\\\\/=>]`,""),w=new RegExp("^\\/\\s*\\w+s*>"),c=t?e.slice(t):e,y=O(e,t),d=!1,p=!1,A={cb:G,i:!0,trimCharsBeforeMatching:["/",j,"!"," "," ",`
17
- `,"\r"]};return o.allowCustomTagNames?((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[O(e,y)]==="<")||c[0]==="<"&&c[1]&&c[1].trim())&&(f.test(c)||/^<\w+$/.test(c))||r.test(c)&&R(e,t)||l.test(c)||b.test(c)&&R(e,t)||h.test(c)||e[t]==="/"&&e[y]!=="<"&&w.test(c))&&(p=!0):(((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[O(e,y)]==="<")||(c[0]==="<"||c[0]==="/"&&(!e[y]||e[y]!=="<"))&&c[1]&&c[1].trim())&&f.test(c)||i.test(c)&&R(e,t)||u.test(c)||g.test(c)&&R(e,t)||m.test(c))&&(d=!0),d&&Q(e,t,T,{cb:$=>$===void 0?((e[t]==="<"&&e[t+1]&&e[t+1].trim()||e[t-1]==="<")&&(p=!0),!0):$.toUpperCase()===$.toLowerCase()&&!/\d/.test($)&&$!=="=",i:!0,trimCharsBeforeMatching:["<","/",j,"!"," "," ",`
18
- `,"\r"]})&&(p=!0)),!p&&e[t]==="<"&&e[t+1]&&e[t+1].trim()&&K(e,t,T,A)&&(p=!0),typeof e=="string"&&t<e.length&&p}return se(ge);})();
12
+ ${JSON.stringify(o,null,4)}`);if(n&&!S(n))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof n}", and equal to:
13
+ ${JSON.stringify(n,null,4)}`);let u=0,l="";if(a!=null&&a.trimCharsBeforeMatching&&a.trimCharsBeforeMatching.some((p,h)=>p.length>1?(u=h,l=p,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${u} is longer than 1 character, ${l.length} (equals to ${l}). Please split it into separate characters and put into array as separate elements.`);if(!i||!Array.isArray(i)||Array.isArray(i)&&!i.length||Array.isArray(i)&&i.length===1&&C(i[0])&&!i[0].trim()){if(typeof a.cb=="function"){let h,f=s;if((e==="matchLeftIncl"||e==="matchRight")&&(f+=1),e[5]==="L")for(let d=f;d--;){let m=t[d];if((!a.trimBeforeMatching||a.trimBeforeMatching&&(m!=null&&m.trim()))&&(!((g=a.trimCharsBeforeMatching)!=null&&g.length)||m!==void 0&&!a.trimCharsBeforeMatching.includes(m))){h=d;break}}else if(e.startsWith("matchRight"))for(let d=f;d<t.length;d++){let m=t[d];if((!a.trimBeforeMatching||a.trimBeforeMatching&&m.trim())&&(!((b=a.trimCharsBeforeMatching)!=null&&b.length)||!a.trimCharsBeforeMatching.includes(m))){h=d;break}}if(h===void 0)return!1;let w=t[h],c=h+1,y="";return c&&c>0&&(y=t.slice(0,c)),e[5]==="L"||h&&h>0&&(y=t.slice(h)),a.cb(w,y,h)}let p="";throw n||(p=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${p}`)}for(let p=0,h=i.length;p<h;p++){r=typeof i[p]=="function";let f=i[p],w,c,y="",d=s;e==="matchRight"?d+=1:e==="matchLeft"&&(d-=1);let m=me(t,d,f,a,r,A=>e[5]==="L"?A-1:A+1);if(m&&r&&typeof f=="function"&&f()==="EOL")return f()&&(!a.cb||a.cb(w,y,c))?f():!1;if(Number.isInteger(m)&&(c=e.startsWith("matchLeft")?m-1:m+1,e[5]==="L"?y=t.slice(0,m):y=t.slice(c)),c<0&&(c=void 0),t[c]&&(w=t[c]),Number.isInteger(m)&&(!a.cb||a.cb(w,y,c)))return f}return!1}function G(e,t,s,o){return z("matchRightIncl",e,t,s,o)}function Z(e,t,s,o){return z("matchRight",e,t,s,o)}var Y=H(N(),1);var Re=(0,Y.default)();var x="\xA0";function pe({str:e,idx:t,stopAtNewlines:s,stopAtRawNbsp:o}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||s&&`
14
+ \r`.includes(e[~-t])||o&&e[~-t]===x))return~-t;if(e[t-2]&&(e[t-2].trim()||s&&`
15
+ \r`.includes(e[t-2])||o&&e[t-2]===x))return t-2;for(let n=t;n--;)if(e[n]&&(e[n].trim()||s&&`
16
+ \r`.includes(e[n])||o&&e[n]===x))return n;return null}function E(e,t=0){return pe({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var j={allowCustomTagNames:!1,skipOpeningBracket:!1},T="\\",I=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","big","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h1 - h6","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xml"];function X(e){return e===void 0||e.toUpperCase()===e.toLowerCase()&&!/\d/.test(e)&&e!=="="}function L(e,t){return e[t]==="<"||e[E(e,t)]==="<"}var ee="4.0.15";var he=ee;function de(e,t=0,s){var $,M,V;if(typeof e!="string")throw new Error(`is-html-tag-opening: [THROW_ID_01] the first input argument should have been a string but it was given as "${typeof e}", value being ${JSON.stringify(e,null,4)}`);if(!Number.isInteger(t)||t<0)throw new Error(`is-html-tag-opening: [THROW_ID_02] the second input argument should have been a natural number string index but it was given as "${typeof t}", value being ${JSON.stringify(t,null,4)}`);let o=v(v({},j),s),n="[\\\\ \\t\\r\\n/]*",a="._a-z0-9\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\uFFFF",i=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+${n}\\/?${n}>`,"g"),r=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*${n}>`,"g"),u=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+\\w+(?:-\\w+)?\\s*=\\s*['"\\w]`,"g"),l=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\w+\\s+[${a}]+[-${a}]*(?:-\\w+)?\\s*=\\s*['"\\w]`),g=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*\\w+\\s*\\/?\\s*>`,"g"),b=new RegExp(`^<${o.skipOpeningBracket?"?":""}\\s*\\/?\\s*[${a}]+[-${a}]*\\s*\\/?\\s*>`,"g"),p=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}\\w+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),h=new RegExp(`^<${o.skipOpeningBracket?"?":""}${n}[${a}]+[-${a}]*\\s+(?:\\s*\\w+)?\\s*\\w+=['"]`,"g"),f=new RegExp(`^<${o.skipOpeningBracket?"?\\/?":""}(${n}[${a}]+)+${n}[\\\\/=>]`,""),w=new RegExp("^\\/\\s*\\w+s*>"),c=t?e.slice(t):e,y=E(e,t),d=!1,m=!1,A={cb:X,i:!0,trimCharsBeforeMatching:["/",T,"!"," "," ",`
17
+ `,"\r"]};return o.allowCustomTagNames?((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[E(e,y)]==="<")||c[0]==="<"&&(($=c[1])!=null&&$.trim()))&&(f.test(c)||/^<\w+$/.test(c))||r.test(c)&&L(e,t)||l.test(c)||b.test(c)&&L(e,t)||h.test(c)||e[t]==="/"&&e[y]!=="<"&&w.test(c))&&(m=!0):(((o.skipOpeningBracket&&(e[t-1]==="<"||e[t-1]==="/"&&e[E(e,y)]==="<")||(c[0]==="<"||c[0]==="/"&&(!e[y]||e[y]!=="<"))&&((M=c[1])!=null&&M.trim()))&&f.test(c)||i.test(c)&&L(e,t)||u.test(c)||g.test(c)&&L(e,t)||p.test(c))&&(d=!0),d&&G(e,t,I,{cb:B=>{var k;return B===void 0?((e[t]==="<"&&((k=e[t+1])!=null&&k.trim())||e[t-1]==="<")&&(m=!0),!0):B.toUpperCase()===B.toLowerCase()&&!/\d/.test(B)&&B!=="="},i:!0,trimCharsBeforeMatching:["<","/",T,"!"," "," ",`
18
+ `,"\r"]})&&(m=!0)),!m&&e[t]==="<"&&((V=e[t+1])!=null&&V.trim())&&Z(e,t,I,A)&&(m=!0),typeof e=="string"&&t<e.length&&m}return le(be);})();
19
19
  /**
20
20
  * @name arrayiffy-if-string
21
21
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
22
- * @version 5.0.5
22
+ * @version 5.0.6
23
23
  * @author Roy Revelt, Codsen Ltd
24
24
  * @license MIT
25
25
  * {@link https://codsen.com/os/arrayiffy-if-string/}
@@ -27,7 +27,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if(a!=null&&a.trimCharsBeforeMatching
27
27
  /**
28
28
  * @name codsen-utils
29
29
  * @fileoverview Various utility functions
30
- * @version 1.6.0
30
+ * @version 1.6.2
31
31
  * @author Roy Revelt, Codsen Ltd
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/codsen-utils/}
@@ -35,7 +35,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if(a!=null&&a.trimCharsBeforeMatching
35
35
  /**
36
36
  * @name string-match-left-right
37
37
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
38
- * @version 9.0.13
38
+ * @version 9.0.15
39
39
  * @author Roy Revelt, Codsen Ltd
40
40
  * @license MIT
41
41
  * {@link https://codsen.com/os/string-match-left-right/}
@@ -43,7 +43,7 @@ ${JSON.stringify(n,null,4)}`);let u=0,l="";if(a!=null&&a.trimCharsBeforeMatching
43
43
  /**
44
44
  * @name string-left-right
45
45
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
46
- * @version 6.0.13
46
+ * @version 6.0.15
47
47
  * @author Roy Revelt, Codsen Ltd
48
48
  * @license MIT
49
49
  * {@link https://codsen.com/os/string-left-right/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-html-tag-opening",
3
- "version": "4.0.13",
3
+ "version": "4.0.15",
4
4
  "description": "Does an HTML tag start at given position?",
5
5
  "keywords": [
6
6
  "bracket",
@@ -42,7 +42,7 @@
42
42
  "cjs-on": "exit 0",
43
43
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && npm run dts",
44
44
  "devtest": "c8 npm run unit && npm run examples && npm run lint",
45
- "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --loglevel 'silent'",
45
+ "dts": "rollup -c && npm run prettier -- 'types/index.d.ts' --write --log-level 'silent'",
46
46
  "examples": "node '../../ops/scripts/run-examples.js'",
47
47
  "lect": "node '../../ops/lect/lect.js' && npm run prettier -- 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
48
48
  "letspublish": "npm publish || :",
@@ -50,7 +50,7 @@
50
50
  "perf": "node perf/check.js",
51
51
  "prep": "echo 'ready'",
52
52
  "prettier": "prettier",
53
- "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --loglevel 'silent'",
53
+ "prettier:format": "npm run prettier -- --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern --log-level 'silent'",
54
54
  "pretest": "npm run lect && npm run build",
55
55
  "test": "npm run devtest",
56
56
  "unit": "uvu test"
@@ -73,10 +73,10 @@
73
73
  }
74
74
  },
75
75
  "dependencies": {
76
- "string-left-right": "^6.0.13",
77
- "string-match-left-right": "^9.0.13"
76
+ "string-left-right": "^6.0.15",
77
+ "string-match-left-right": "^9.0.15"
78
78
  },
79
79
  "devDependencies": {
80
- "test-mixer": "^4.1.10"
80
+ "test-mixer": "^4.1.12"
81
81
  }
82
82
  }
package/types/index.d.ts CHANGED
@@ -11,7 +11,7 @@ interface Opts {
11
11
  declare function isOpening(
12
12
  str: string,
13
13
  idx?: number,
14
- opts?: Partial<Opts>
14
+ opts?: Partial<Opts>,
15
15
  ): boolean;
16
16
 
17
- export { Opts, defaultOpts as defaults, isOpening, version };
17
+ export { type Opts, defaultOpts as defaults, isOpening, version };