vest-utils
Advanced tools
Comparing version 1.0.0-next-198c0e to 1.0.0-next-1de937
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function bindNot(fn) { | ||
@@ -6,0 +4,0 @@ return (...args) => !fn(...args); |
@@ -1,1 +0,1 @@ | ||
"use strict";function t(t){return(...n)=>!t(...n)}function n(t){const n=String(t),r=Number(t),e=!isNaN(parseFloat(n))&&!isNaN(Number(t))&&isFinite(r);return Boolean(e)}Object.defineProperty(exports,"__esModule",{value:!0});const r=t(n);function e(t,r){return n(t)&&n(r)&&Number(t)===Number(r)}const o=t(e);function s(t,n){return e(t.length,n)}const u=t(s);function i(t,r){return n(t)&&n(r)&&Number(t)>Number(r)}function c(t,n){return i(t.length,n)}function f(t){return null===t}const p=t(f);function l(t){return void 0===t}const a=t(l);function x(t){return f(t)||l(t)}const h=t(x);function N(t){return[].concat(t)}function g(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function b(t){return"function"==typeof t}function y(t,...n){return b(t)?t(...n):t}var m=Object.assign;var d=Object.freeze({__proto__:null,createBus:function(){const t={};return{emit(t,r){n(t).forEach((t=>{t(r)}))},on:(r,e)=>(t[r]=n(r).concat(e),{off(){t[r]=n(r).filter((t=>t!==e))}})};function n(n){return t[n]||[]}}});const v=E();function E(t){return n=0,()=>`${t?t+"_":""}${n++}`;var n}function O(t){return"object"==typeof t&&!x(t)}function _(t){return Boolean(Array.isArray(t))}const j=t(_);function S(t){return!t||(g(t,"length")?s(t,0):!!O(t)&&s(Object.keys(t),0))}const w=t(S);const q=/{(.*?)}/g;var T=Object.freeze({__proto__:null,createTinyState:function(t){let n;return e(),()=>[n,r,e];function r(t){n=y(t,n)}function e(){r(y(t))}}});exports.StringObject=function(t){return new String(y(t))},exports.asArray=N,exports.assign=m,exports.bindNot=t,exports.bus=d,exports.cache=function(t=1){const n=[],r=(e,o)=>{const s=r.get(e);if(s)return s[1];const u=o();return n.unshift([e.concat(),u]),c(n,t)&&(n.length=t),u};return r.invalidate=t=>{const r=e(t);r>-1&&n.splice(r,1)},r.get=t=>n[e(t)]||null,r;function e(t){return n.findIndex((([n])=>s(t,n.length)&&t.every(((t,r)=>t===n[r]))))}},exports.callEach=function(t){return t.forEach((t=>t()))},exports.defaultTo=function(t,n){var r;return null!==(r=y(t))&&void 0!==r?r:y(n)},exports.deferThrow=function(t){setTimeout((()=>{throw new Error(t)}),0)},exports.either=function(t,n){return!!t!=!!n},exports.genSeq=E,exports.greaterThan=i,exports.hasOwnProperty=g,exports.invariant=function(t,n){if(!t)throw n instanceof String?n.valueOf():new Error(n?y(n):n)},exports.isArray=_,exports.isBoolean=function(t){return!!t===t},exports.isEmpty=S,exports.isFunction=b,exports.isNotArray=j,exports.isNotEmpty=w,exports.isNotNull=p,exports.isNotNullish=h,exports.isNotNumeric=r,exports.isNotUndefined=a,exports.isNull=f,exports.isNullish=x,exports.isNumeric=n,exports.isObject=O,exports.isPositive=function(t){return i(t,0)},exports.isPromise=function(t){return t&&b(t.then)},exports.isStringValue=function(t){return String(t)===t},exports.isUndefined=l,exports.last=function(t){const n=N(t);return n[n.length-1]},exports.lengthEquals=s,exports.lengthNotEquals=u,exports.longerThan=c,exports.mapFirst=function(t,n){let r=!1,e=null;for(let s=0;s<t.length;s++)if(n(t[s],o,s),r)return e;function o(t,n){t&&(r=!0,e=n)}},exports.numberEquals=e,exports.numberNotEquals=o,exports.optionalFunctionValue=y,exports.seq=v,exports.text=function(t,...n){const r=n[0];if(O(r))return t.replace(q,((t,n)=>{var e;return`${null!==(e=r[n])&&void 0!==e?e:t}`}));const e=[...n];return t.replace(q,(t=>`${S(e)?t:e.shift()}`))},exports.tinyState=T; | ||
"use strict";function t(t){return(...n)=>!t(...n)}function n(t){const n=String(t),r=Number(t),e=!isNaN(parseFloat(n))&&!isNaN(Number(t))&&isFinite(r);return Boolean(e)}const r=t(n);function e(t,r){return n(t)&&n(r)&&Number(t)===Number(r)}const o=t(e);function s(t,n){return e(t.length,n)}const u=t(s);function i(t,r){return n(t)&&n(r)&&Number(t)>Number(r)}function c(t,n){return i(t.length,n)}function f(t){return null===t}const p=t(f);function l(t){return void 0===t}const a=t(l);function x(t){return f(t)||l(t)}const h=t(x);function N(t){return[].concat(t)}function g(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function b(t){return"function"==typeof t}function m(t,...n){return b(t)?t(...n):t}var y=Object.assign;var v=Object.freeze({__proto__:null,createBus:function(){const t={};return{emit(t,r){n(t).forEach((t=>{t(r)}))},on:(r,e)=>(t[r]=n(r).concat(e),{off(){t[r]=n(r).filter((t=>t!==e))}})};function n(n){return t[n]||[]}}});const d=E();function E(t){return n=0,()=>`${t?t+"_":""}${n++}`;var n}function O(t){return"object"==typeof t&&!x(t)}function S(t){return Boolean(Array.isArray(t))}const _=t(S);function j(t){return!t||(g(t,"length")?s(t,0):!!O(t)&&s(Object.keys(t),0))}const w=t(j);const q=/{(.*?)}/g;var T=Object.freeze({__proto__:null,createTinyState:function(t){let n;return e(),()=>[n,r,e];function r(t){n=m(t,n)}function e(){r(m(t))}}});exports.StringObject=function(t){return new String(m(t))},exports.asArray=N,exports.assign=y,exports.bindNot=t,exports.bus=v,exports.cache=function(t=1){const n=[],r=(e,o)=>{const s=r.get(e);if(s)return s[1];const u=o();return n.unshift([e.concat(),u]),c(n,t)&&(n.length=t),u};return r.invalidate=t=>{const r=e(t);r>-1&&n.splice(r,1)},r.get=t=>n[e(t)]||null,r;function e(t){return n.findIndex((([n])=>s(t,n.length)&&t.every(((t,r)=>t===n[r]))))}},exports.callEach=function(t){return t.forEach((t=>t()))},exports.defaultTo=function(t,n){var r;return null!==(r=m(t))&&void 0!==r?r:m(n)},exports.deferThrow=function(t){setTimeout((()=>{throw new Error(t)}),0)},exports.either=function(t,n){return!!t!=!!n},exports.genSeq=E,exports.greaterThan=i,exports.hasOwnProperty=g,exports.invariant=function(t,n){if(!t)throw n instanceof String?n.valueOf():new Error(n?m(n):n)},exports.isArray=S,exports.isBoolean=function(t){return!!t===t},exports.isEmpty=j,exports.isFunction=b,exports.isNotArray=_,exports.isNotEmpty=w,exports.isNotNull=p,exports.isNotNullish=h,exports.isNotNumeric=r,exports.isNotUndefined=a,exports.isNull=f,exports.isNullish=x,exports.isNumeric=n,exports.isObject=O,exports.isPositive=function(t){return i(t,0)},exports.isPromise=function(t){return t&&b(t.then)},exports.isStringValue=function(t){return String(t)===t},exports.isUndefined=l,exports.last=function(t){const n=N(t);return n[n.length-1]},exports.lengthEquals=s,exports.lengthNotEquals=u,exports.longerThan=c,exports.mapFirst=function(t,n){let r=!1,e=null;for(let s=0;s<t.length;s++)if(n(t[s],o,s),r)return e;function o(t,n){t&&(r=!0,e=n)}},exports.numberEquals=e,exports.numberNotEquals=o,exports.optionalFunctionValue=m,exports.seq=d,exports.text=function(t,...n){const r=n[0];if(O(r))return t.replace(q,((t,n)=>{var e;return`${null!==(e=r[n])&&void 0!==e?e:t}`}));const e=[...n];return t.replace(q,(t=>`${j(e)?t:e.shift()}`))},exports.tinyState=T; |
@@ -316,4 +316,2 @@ (function (global, factory) { | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
})); |
@@ -1,1 +0,1 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self)["vest-utils"]={})}(this,(function(n){"use strict";function t(n){return(...t)=>!n(...t)}function e(n){const t=String(n),e=Number(n),r=!isNaN(parseFloat(t))&&!isNaN(Number(n))&&isFinite(e);return Boolean(r)}const r=t(e);function o(n,t){return e(n)&&e(t)&&Number(n)===Number(t)}const i=t(o);function u(n,t){return o(n.length,t)}const c=t(u);function s(n,t){return e(n)&&e(t)&&Number(n)>Number(t)}function f(n,t){return s(n.length,t)}function l(n){return null===n}const a=t(l);function h(n){return void 0===n}const g=t(h);function N(n){return l(n)||h(n)}const d=t(N);function p(n){return[].concat(n)}function b(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function y(n){return"function"==typeof n}function m(n,...t){return y(n)?n(...t):n}var v=Object.assign;var E=Object.freeze({__proto__:null,createBus:function(){const n={};return{emit(n,e){t(n).forEach((n=>{n(e)}))},on:(e,r)=>(n[e]=t(e).concat(r),{off(){n[e]=t(e).filter((n=>n!==r))}})};function t(t){return n[t]||[]}}});const O=_();function _(n){return t=0,()=>`${n?n+"_":""}${t++}`;var t}function j(n){return"object"==typeof n&&!N(n)}function S(n){return Boolean(Array.isArray(n))}const w=t(S);function T(n){return!n||(b(n,"length")?u(n,0):!!j(n)&&u(Object.keys(n),0))}const q=t(T);const x=/{(.*?)}/g;var A=Object.freeze({__proto__:null,createTinyState:function(n){let t;return r(),()=>[t,e,r];function e(n){t=m(n,t)}function r(){e(m(n))}}});n.StringObject=function(n){return new String(m(n))},n.asArray=p,n.assign=v,n.bindNot=t,n.bus=E,n.cache=function(n=1){const t=[],e=(r,o)=>{const i=e.get(r);if(i)return i[1];const u=o();return t.unshift([r.concat(),u]),f(t,n)&&(t.length=n),u};return e.invalidate=n=>{const e=r(n);e>-1&&t.splice(e,1)},e.get=n=>t[r(n)]||null,e;function r(n){return t.findIndex((([t])=>u(n,t.length)&&n.every(((n,e)=>n===t[e]))))}},n.callEach=function(n){return n.forEach((n=>n()))},n.defaultTo=function(n,t){var e;return null!==(e=m(n))&&void 0!==e?e:m(t)},n.deferThrow=function(n){setTimeout((()=>{throw new Error(n)}),0)},n.either=function(n,t){return!!n!=!!t},n.genSeq=_,n.greaterThan=s,n.hasOwnProperty=b,n.invariant=function(n,t){if(!n)throw t instanceof String?t.valueOf():new Error(t?m(t):t)},n.isArray=S,n.isBoolean=function(n){return!!n===n},n.isEmpty=T,n.isFunction=y,n.isNotArray=w,n.isNotEmpty=q,n.isNotNull=a,n.isNotNullish=d,n.isNotNumeric=r,n.isNotUndefined=g,n.isNull=l,n.isNullish=N,n.isNumeric=e,n.isObject=j,n.isPositive=function(n){return s(n,0)},n.isPromise=function(n){return n&&y(n.then)},n.isStringValue=function(n){return String(n)===n},n.isUndefined=h,n.last=function(n){const t=p(n);return t[t.length-1]},n.lengthEquals=u,n.lengthNotEquals=c,n.longerThan=f,n.mapFirst=function(n,t){let e=!1,r=null;for(let i=0;i<n.length;i++)if(t(n[i],o,i),e)return r;function o(n,t){n&&(e=!0,r=t)}},n.numberEquals=o,n.numberNotEquals=i,n.optionalFunctionValue=m,n.seq=O,n.text=function(n,...t){const e=t[0];if(j(e))return n.replace(x,((n,t)=>{var r;return`${null!==(r=e[t])&&void 0!==r?r:n}`}));const r=[...t];return n.replace(x,(n=>`${T(r)?n:r.shift()}`))},n.tinyState=A,Object.defineProperty(n,"__esModule",{value:!0})})); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self)["vest-utils"]={})}(this,(function(n){"use strict";function t(n){return(...t)=>!n(...t)}function e(n){const t=String(n),e=Number(n),r=!isNaN(parseFloat(t))&&!isNaN(Number(n))&&isFinite(e);return Boolean(r)}const r=t(e);function o(n,t){return e(n)&&e(t)&&Number(n)===Number(t)}const i=t(o);function u(n,t){return o(n.length,t)}const c=t(u);function s(n,t){return e(n)&&e(t)&&Number(n)>Number(t)}function f(n,t){return s(n.length,t)}function l(n){return null===n}const a=t(l);function h(n){return void 0===n}const g=t(h);function N(n){return l(n)||h(n)}const p=t(N);function d(n){return[].concat(n)}function b(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function y(n){return"function"==typeof n}function m(n,...t){return y(n)?n(...t):n}var v=Object.assign;var E=Object.freeze({__proto__:null,createBus:function(){const n={};return{emit(n,e){t(n).forEach((n=>{n(e)}))},on:(e,r)=>(n[e]=t(e).concat(r),{off(){n[e]=t(e).filter((n=>n!==r))}})};function t(t){return n[t]||[]}}});const O=j();function j(n){return t=0,()=>`${n?n+"_":""}${t++}`;var t}function S(n){return"object"==typeof n&&!N(n)}function _(n){return Boolean(Array.isArray(n))}const w=t(_);function T(n){return!n||(b(n,"length")?u(n,0):!!S(n)&&u(Object.keys(n),0))}const q=t(T);const x=/{(.*?)}/g;var A=Object.freeze({__proto__:null,createTinyState:function(n){let t;return r(),()=>[t,e,r];function e(n){t=m(n,t)}function r(){e(m(n))}}});n.StringObject=function(n){return new String(m(n))},n.asArray=d,n.assign=v,n.bindNot=t,n.bus=E,n.cache=function(n=1){const t=[],e=(r,o)=>{const i=e.get(r);if(i)return i[1];const u=o();return t.unshift([r.concat(),u]),f(t,n)&&(t.length=n),u};return e.invalidate=n=>{const e=r(n);e>-1&&t.splice(e,1)},e.get=n=>t[r(n)]||null,e;function r(n){return t.findIndex((([t])=>u(n,t.length)&&n.every(((n,e)=>n===t[e]))))}},n.callEach=function(n){return n.forEach((n=>n()))},n.defaultTo=function(n,t){var e;return null!==(e=m(n))&&void 0!==e?e:m(t)},n.deferThrow=function(n){setTimeout((()=>{throw new Error(n)}),0)},n.either=function(n,t){return!!n!=!!t},n.genSeq=j,n.greaterThan=s,n.hasOwnProperty=b,n.invariant=function(n,t){if(!n)throw t instanceof String?t.valueOf():new Error(t?m(t):t)},n.isArray=_,n.isBoolean=function(n){return!!n===n},n.isEmpty=T,n.isFunction=y,n.isNotArray=w,n.isNotEmpty=q,n.isNotNull=a,n.isNotNullish=p,n.isNotNumeric=r,n.isNotUndefined=g,n.isNull=l,n.isNullish=N,n.isNumeric=e,n.isObject=S,n.isPositive=function(n){return s(n,0)},n.isPromise=function(n){return n&&y(n.then)},n.isStringValue=function(n){return String(n)===n},n.isUndefined=h,n.last=function(n){const t=d(n);return t[t.length-1]},n.lengthEquals=u,n.lengthNotEquals=c,n.longerThan=f,n.mapFirst=function(n,t){let e=!1,r=null;for(let i=0;i<n.length;i++)if(t(n[i],o,i),e)return r;function o(n,t){n&&(e=!0,r=t)}},n.numberEquals=o,n.numberNotEquals=i,n.optionalFunctionValue=m,n.seq=O,n.text=function(n,...t){const e=t[0];if(S(e))return n.replace(x,((n,t)=>{var r;return`${null!==(r=e[t])&&void 0!==r?r:n}`}));const r=[...t];return n.replace(x,(n=>`${T(r)?n:r.shift()}`))},n.tinyState=A})); |
{ | ||
"version": "1.0.0-next-198c0e", | ||
"version": "1.0.0-next-1de937", | ||
"name": "vest-utils", | ||
@@ -47,2 +47,2 @@ "author": "ealush", | ||
} | ||
} | ||
} |
43742
951