codsen-utils 1.3.0 → 1.3.1

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,10 +1,10 @@
1
1
  /**
2
2
  * @name codsen-utils
3
3
  * @fileoverview Various utility functions
4
- * @version 1.3.0
4
+ * @version 1.3.1
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/codsen-utils/}
8
8
  */
9
9
 
10
- var s="1.3.0";var x=s,c="\u2018",u="\u2019",l="\u201C",a="\u201D",h="\u2013",g="\u2014",y="\xA0",w="\u2026",k="\u200A",C="\u2009",j="\u2032",S="\u2033",T="\\",A="\uFFFD",L="`",O="\xD7",$=[".",",",";","!","?"];function D(t){return n(t)&&t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57}function m(t){return n(t)&&"\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4".includes(t)}function R(t){let e=new Set(["$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);return n(t)&&!!t.trim()&&(m(t)||e.has(t))}function i(t){return n(t)&&t.length===1&&t.toUpperCase()!==t.toLowerCase()}function N(t){return!!(t&&n(t)&&(t.charCodeAt(0)>64&&t.charCodeAt(0)<91||t.charCodeAt(0)>96&&t.charCodeAt(0)<123))}function P(t){return n(t)&&(t==='"'||t==="'"||t===c||t===u||t===l||t===a)}function M(t){return!n(t)||!i(t)?!1:t===t.toLowerCase()&&t!==t.toUpperCase()}function U(t){return!n(t)||!i(t)?!1:t===t.toUpperCase()&&t!==t.toLowerCase()}function F(t){return!n(t)||!t?!1:!t[0].trim()}var Q=t=>n(t)&&t.length&&t.endsWith("/")?t.slice(0,-1).trim():t;function d(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function B(t="",e=0,r=0,o=""){return e<0&&(e+=t.length,e<0&&(e=0)),t.slice(0,e)+(o||"")+t.slice(e+r)}function n(t){return typeof t=="string"}function I(t){return Number.isFinite(t)}function E(t){return Number.isSafeInteger(t)&&t>=0}function q(t){return typeof t=="boolean"}function K(t){return t===null}function V(t,e){if(!n(t)||!n(e))return[];let r=[],o=-1;for(;(o=t.indexOf(e,o+1))>=0;)r.push(o);return r}function W(t=[],e=[]){return!t||!Array.isArray(t)||!t.length?[]:!e||!Array.isArray(e)||!e.length?t:t.filter(r=>!e.includes(r))}function Z(t){return t!=null}function z(t){return[...new Set(t)]}function G(t,e){return d(t)&&n(e)&&Object.prototype.hasOwnProperty.call(t,e)}var H=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],J=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]);export{T as backslash,L as backtick,S as doublePrime,w as ellipsis,Z as existy,V as findAllIdx,k as hairspace,G as hasOwnProp,J as inlineTags,q as isBool,m as isCurrencyChar,R as isCurrencySymbol,E as isInt,N as isLatinLetter,i as isLetter,M as isLowercaseLetter,K as isNull,I as isNum,D as isNumberChar,d as isPlainObject,P as isQuote,n as isStr,U as isUppercaseLetter,F as isWhitespaceChar,l as leftDoubleQuote,c as leftSingleQuote,O as multiplicationSign,W as pullAll,$ as punctuationChars,g as rawMDash,h as rawNDash,y as rawNbsp,A as rawReplacementMark,Q as removeTrailingSlash,a as rightDoubleQuote,u as rightSingleQuote,j as singlePrime,B as stringSplice,C as thinSpace,z as uniq,x as version,H as voidTags};
10
+ var s="1.3.1";var x=s,c="\u2018",u="\u2019",l="\u201C",a="\u201D",h="\u2013",g="\u2014",y="\xA0",w="\u2026",k="\u200A",C="\u2009",j="\u2032",S="\u2033",T="\\",A="\uFFFD",L="`",O="\xD7",$=[".",",",";","!","?"];function D(t){return n(t)&&t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57}function m(t){return n(t)&&"\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4".includes(t)}function R(t){let e=new Set(["$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);return n(t)&&!!t.trim()&&(m(t)||e.has(t))}function i(t){return n(t)&&t.length===1&&t.toUpperCase()!==t.toLowerCase()}function N(t){return!!(t&&n(t)&&(t.charCodeAt(0)>64&&t.charCodeAt(0)<91||t.charCodeAt(0)>96&&t.charCodeAt(0)<123))}function P(t){return n(t)&&(t==='"'||t==="'"||t===c||t===u||t===l||t===a)}function M(t){return!n(t)||!i(t)?!1:t===t.toLowerCase()&&t!==t.toUpperCase()}function U(t){return!n(t)||!i(t)?!1:t===t.toUpperCase()&&t!==t.toLowerCase()}function F(t){return!n(t)||!t?!1:!t[0].trim()}var Q=t=>n(t)&&t.length&&t.endsWith("/")?t.slice(0,-1).trim():t;function d(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function B(t="",e=0,r=0,o=""){return e<0&&(e+=t.length,e<0&&(e=0)),t.slice(0,e)+(o||"")+t.slice(e+r)}function n(t){return typeof t=="string"}function I(t){return Number.isFinite(t)}function E(t){return Number.isSafeInteger(t)&&t>=0}function q(t){return typeof t=="boolean"}function K(t){return t===null}function V(t,e){if(!n(t)||!n(e))return[];let r=[],o=-1;for(;(o=t.indexOf(e,o+1))>=0;)r.push(o);return r}function W(t=[],e=[]){return!t||!Array.isArray(t)||!t.length?[]:!e||!Array.isArray(e)||!e.length?t:t.filter(r=>!e.includes(r))}function Z(t){return t!=null}function z(t){return[...new Set(t)]}function G(t,e){return d(t)&&n(e)&&Object.prototype.hasOwnProperty.call(t,e)}var H=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],J=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]);export{T as backslash,L as backtick,S as doublePrime,w as ellipsis,Z as existy,V as findAllIdx,k as hairspace,G as hasOwnProp,J as inlineTags,q as isBool,m as isCurrencyChar,R as isCurrencySymbol,E as isInt,N as isLatinLetter,i as isLetter,M as isLowercaseLetter,K as isNull,I as isNum,D as isNumberChar,d as isPlainObject,P as isQuote,n as isStr,U as isUppercaseLetter,F as isWhitespaceChar,l as leftDoubleQuote,c as leftSingleQuote,O as multiplicationSign,W as pullAll,$ as punctuationChars,g as rawMDash,h as rawNDash,y as rawNbsp,A as rawReplacementMark,Q as removeTrailingSlash,a as rightDoubleQuote,u as rightSingleQuote,j as singlePrime,B as stringSplice,C as thinSpace,z as uniq,x as version,H as voidTags};
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name codsen-utils
3
3
  * @fileoverview Various utility functions
4
- * @version 1.3.0
4
+ * @version 1.3.1
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/codsen-utils/}
8
8
  */
9
9
 
10
- "use strict";var codsenUtils=(()=>{var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},y=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of x(e))!h.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(o=f(e,s))||o.enumerable});return t};var w=t=>y(i({},"__esModule",{value:!0}),t);var nt={};g(nt,{backslash:()=>R,backtick:()=>P,doublePrime:()=>D,ellipsis:()=>A,existy:()=>Y,findAllIdx:()=>J,hairspace:()=>L,hasOwnProp:()=>v,inlineTags:()=>et,isBool:()=>G,isCurrencyChar:()=>d,isCurrencySymbol:()=>Q,isInt:()=>z,isLatinLetter:()=>B,isLetter:()=>p,isLowercaseLetter:()=>E,isNull:()=>H,isNum:()=>Z,isNumberChar:()=>F,isPlainObject:()=>b,isQuote:()=>I,isStr:()=>n,isUppercaseLetter:()=>q,isWhitespaceChar:()=>K,leftDoubleQuote:()=>a,leftSingleQuote:()=>u,multiplicationSign:()=>M,pullAll:()=>X,punctuationChars:()=>U,rawMDash:()=>S,rawNDash:()=>j,rawNbsp:()=>T,rawReplacementMark:()=>N,removeTrailingSlash:()=>V,rightDoubleQuote:()=>m,rightSingleQuote:()=>l,singlePrime:()=>$,stringSplice:()=>W,thinSpace:()=>O,uniq:()=>_,version:()=>C,voidTags:()=>tt});var c="1.3.0";var C=c,u="\u2018",l="\u2019",a="\u201C",m="\u201D",j="\u2013",S="\u2014",T="\xA0",A="\u2026",L="\u200A",O="\u2009",$="\u2032",D="\u2033",R="\\",N="\uFFFD",P="`",M="\xD7",U=[".",",",";","!","?"];function F(t){return n(t)&&t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57}function d(t){return n(t)&&"\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4".includes(t)}function Q(t){let e=new Set(["$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);return n(t)&&!!t.trim()&&(d(t)||e.has(t))}function p(t){return n(t)&&t.length===1&&t.toUpperCase()!==t.toLowerCase()}function B(t){return!!(t&&n(t)&&(t.charCodeAt(0)>64&&t.charCodeAt(0)<91||t.charCodeAt(0)>96&&t.charCodeAt(0)<123))}function I(t){return n(t)&&(t==='"'||t==="'"||t===u||t===l||t===a||t===m)}function E(t){return!n(t)||!p(t)?!1:t===t.toLowerCase()&&t!==t.toUpperCase()}function q(t){return!n(t)||!p(t)?!1:t===t.toUpperCase()&&t!==t.toLowerCase()}function K(t){return!n(t)||!t?!1:!t[0].trim()}var V=t=>n(t)&&t.length&&t.endsWith("/")?t.slice(0,-1).trim():t;function b(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function W(t="",e=0,r=0,o=""){return e<0&&(e+=t.length,e<0&&(e=0)),t.slice(0,e)+(o||"")+t.slice(e+r)}function n(t){return typeof t=="string"}function Z(t){return Number.isFinite(t)}function z(t){return Number.isSafeInteger(t)&&t>=0}function G(t){return typeof t=="boolean"}function H(t){return t===null}function J(t,e){if(!n(t)||!n(e))return[];let r=[],o=-1;for(;(o=t.indexOf(e,o+1))>=0;)r.push(o);return r}function X(t=[],e=[]){return!t||!Array.isArray(t)||!t.length?[]:!e||!Array.isArray(e)||!e.length?t:t.filter(r=>!e.includes(r))}function Y(t){return t!=null}function _(t){return[...new Set(t)]}function v(t,e){return b(t)&&n(e)&&Object.prototype.hasOwnProperty.call(t,e)}var tt=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],et=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]);return w(nt);})();
10
+ "use strict";var codsenUtils=(()=>{var i=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})},y=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of x(e))!h.call(t,s)&&s!==r&&i(t,s,{get:()=>e[s],enumerable:!(o=f(e,s))||o.enumerable});return t};var w=t=>y(i({},"__esModule",{value:!0}),t);var nt={};g(nt,{backslash:()=>R,backtick:()=>P,doublePrime:()=>D,ellipsis:()=>A,existy:()=>Y,findAllIdx:()=>J,hairspace:()=>L,hasOwnProp:()=>v,inlineTags:()=>et,isBool:()=>G,isCurrencyChar:()=>d,isCurrencySymbol:()=>Q,isInt:()=>z,isLatinLetter:()=>B,isLetter:()=>p,isLowercaseLetter:()=>E,isNull:()=>H,isNum:()=>Z,isNumberChar:()=>F,isPlainObject:()=>b,isQuote:()=>I,isStr:()=>n,isUppercaseLetter:()=>q,isWhitespaceChar:()=>K,leftDoubleQuote:()=>a,leftSingleQuote:()=>u,multiplicationSign:()=>M,pullAll:()=>X,punctuationChars:()=>U,rawMDash:()=>S,rawNDash:()=>j,rawNbsp:()=>T,rawReplacementMark:()=>N,removeTrailingSlash:()=>V,rightDoubleQuote:()=>m,rightSingleQuote:()=>l,singlePrime:()=>$,stringSplice:()=>W,thinSpace:()=>O,uniq:()=>_,version:()=>C,voidTags:()=>tt});var c="1.3.1";var C=c,u="\u2018",l="\u2019",a="\u201C",m="\u201D",j="\u2013",S="\u2014",T="\xA0",A="\u2026",L="\u200A",O="\u2009",$="\u2032",D="\u2033",R="\\",N="\uFFFD",P="`",M="\xD7",U=[".",",",";","!","?"];function F(t){return n(t)&&t.charCodeAt(0)>=48&&t.charCodeAt(0)<=57}function d(t){return n(t)&&"\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4".includes(t)}function Q(t){let e=new Set(["$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]);return n(t)&&!!t.trim()&&(d(t)||e.has(t))}function p(t){return n(t)&&t.length===1&&t.toUpperCase()!==t.toLowerCase()}function B(t){return!!(t&&n(t)&&(t.charCodeAt(0)>64&&t.charCodeAt(0)<91||t.charCodeAt(0)>96&&t.charCodeAt(0)<123))}function I(t){return n(t)&&(t==='"'||t==="'"||t===u||t===l||t===a||t===m)}function E(t){return!n(t)||!p(t)?!1:t===t.toLowerCase()&&t!==t.toUpperCase()}function q(t){return!n(t)||!p(t)?!1:t===t.toUpperCase()&&t!==t.toLowerCase()}function K(t){return!n(t)||!t?!1:!t[0].trim()}var V=t=>n(t)&&t.length&&t.endsWith("/")?t.slice(0,-1).trim():t;function b(t){if(t==null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null?!1:!(Symbol.iterator in t)&&!(Symbol.toStringTag in t)}function W(t="",e=0,r=0,o=""){return e<0&&(e+=t.length,e<0&&(e=0)),t.slice(0,e)+(o||"")+t.slice(e+r)}function n(t){return typeof t=="string"}function Z(t){return Number.isFinite(t)}function z(t){return Number.isSafeInteger(t)&&t>=0}function G(t){return typeof t=="boolean"}function H(t){return t===null}function J(t,e){if(!n(t)||!n(e))return[];let r=[],o=-1;for(;(o=t.indexOf(e,o+1))>=0;)r.push(o);return r}function X(t=[],e=[]){return!t||!Array.isArray(t)||!t.length?[]:!e||!Array.isArray(e)||!e.length?t:t.filter(r=>!e.includes(r))}function Y(t){return t!=null}function _(t){return[...new Set(t)]}function v(t,e){return b(t)&&n(e)&&Object.prototype.hasOwnProperty.call(t,e)}var tt=["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"],et=new Set(["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]);return w(nt);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codsen-utils",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Various utility functions",
5
5
  "keywords": [
6
6
  "codsen",