@mediacubeco/base 2.0.0 → 2.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/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";const t=t=>void 0===t,e=t=>null===t,s=s=>t(s)||e(s),r=t=>"string"==typeof t,i=t=>"object"==typeof t,o=t=>{const e=[n,a,c,u,l,f,p,h,g,m,d].some(e=>e(t));return!!t&&"object"==typeof t&&!e},n=t=>Array.isArray(t),a=t=>t instanceof ArrayBuffer,c=t=>t instanceof Map,u=t=>t instanceof Set,l=t=>t instanceof Map,f=t=>t instanceof Set,p=t=>t instanceof Date,h=t=>t instanceof Error,g=t=>t instanceof RegExp,m=t=>t instanceof Promise,d=t=>t instanceof Function;const x=(t,...e)=>{if(d(t))return t(...e)};function y(t,e){return!(!i(e)||!(t in e))}function b(t,e){return t.filter(t=>e.includes(t))}class E{isDefaultPrevented=!1;constructor(){this.preventDefault=this.preventDefault.bind(this),this.overrideDefault=this.overrideDefault.bind(this)}preventDefault(){this.isDefaultPrevented=!0}overrideDefault(){this.isDefaultPrevented=!1}}class v{subscriptions={};constructor(){this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.clear=this.clear.bind(this)}emit(t,e,s){const r=this.subscriptions[t];if(r){const{event:t,listenerList:i}=r;i.forEach(s=>x(s,Object.assign(t,e))),t.isDefaultPrevented||x(s)}else x(s)}on(t,e){const s=this.subscriptions[t];return s?s.listenerList.push(e):this.subscriptions[t]={event:new E,listenerList:[e]},()=>this.off(t,e)}off(t,e){const s=this.subscriptions[t];if(s){const{event:r,listenerList:i}=s;this.subscriptions[t]={event:r,listenerList:i.filter(t=>t!==e)},r.overrideDefault()}}clear(t){delete this.subscriptions[t]}}const w=(t="?",...e)=>[`[${(t&&r(t)?t:"?").toUpperCase()}]`,...e.reduce((t,e,s,{length:r})=>{const i=s===r-1?[]:["|"];return t.push(e,...i),t},e.length?["-"]:[])];var D,N,k;!function(t){t.StartGroup="group",t.EndGroup="groupEnd",t.Default="log"}(D||(D={})),function(t){t.Info="%s",t.Success="%s",t.Warning="%s",t.Danger="%s"}(N||(N={}));class S{static formatted={info:(...t)=>S.info(...w(...t)),success:(...t)=>S.success(...w(...t)),warning:(...t)=>S.warning(...w(...t)),danger:(...t)=>S.danger(...w(...t))};static#t(t,...e){console[t](...e)}static startGroup(t,e,...s){S.#t(D.StartGroup,...((t,...e)=>["%c%s",t,...e])(`font-size: 16px;${e}`,...w(t,...s)))}static endGroup(){S.#t(D.EndGroup)}static info(...t){S.#t(D.Default,N.Info,...t)}static success(...t){S.#t(D.Default,N.Success,...t)}static warning(...t){S.#t(D.Default,N.Warning,...t)}static danger(...t){S.#t(D.Default,N.Danger,...t)}}exports.ErrorHandlerEventName=void 0,(k=exports.ErrorHandlerEventName||(exports.ErrorHandlerEventName={})).Capture="capture",k.Forward="forward";class L{static eventEmitter=new v;static caseList=[];static log(t,e={signal:"unknown"}){const{signal:s,message:r,payload:i,stack:o}=e,n=[r,h(t)?t.message:void 0].filter(Boolean);S.formatted.danger(s,...n,{error:t,payload:i,stack:o})}static get on(){return L.eventEmitter.on}static get off(){return L.eventEmitter.off}static get clear(){return L.eventEmitter.clear}static create(t,e){return new Error(t,{cause:e})}static throw(t,e){throw L.create(t,e)}static capture(t,e){L.log(t,e),L.eventEmitter.emit(exports.ErrorHandlerEventName.Capture,{error:t,config:e})}static forward(t,e){throw L.log(t,e),L.eventEmitter.emit(exports.ErrorHandlerEventName.Capture,{error:t,config:e}),t}static case(t){L.caseList.push(t)}static parse(t){const e={message:"Error!",status:0,errors:{},isExternal:!0};for(const{check:s,parse:r}of L.caseList)if(s(t,e))return r(t,e);return!0===h(t)?{message:t.message,status:e.status,errors:e.errors,isExternal:e.isExternal}:{message:e.message,status:e.status,errors:e.errors,isExternal:e.isExternal}}}class j{key;model;config;constructor(t,e,s){this.key=t,this.model=e,this.config=s}async get(t){const{defaultValue:e,withDebug:s}={...this.config,...t},r=await this.model.get(this.key),i=r&&JSON.parse(r)||e;return s&&S.formatted.info("get",this.key,i),i}async set(t,e){const{withDebug:s}={...this.config,...e};await this.model.set(this.key,JSON.stringify(t)),s&&S.formatted.info("set",this.key,t)}async delete(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});await this.model.delete(this.key),e&&S.formatted.info("delete",this.key,s)}async has(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});return e&&S.formatted.info("has",this.key,s),!!s}}exports.ErrorHandler=L,exports.EventEmitter=v,exports.Log=S,exports.Storage=class{model;config;constructor(t,e){this.model=t,this.config=e}async all(){L.throw("Not implemented")}async clear(){L.throw("Not implemented")}create(t){const e={[t]:new j(t,this.model,this.config)};return Object.assign(this,e)}},exports.chunkList=function(t,e){const s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s},exports.compose=function(t,e,r){const i=!o(t);return!s(r)&&{...e,...i?{[r]:t}:t}||!s(e)&&{...e,...t}||{...t}},exports.debounce=(t,e)=>{let s;return(...r)=>{s&&clearTimeout(s),s=setTimeout(()=>x(t,...r),e)}},exports.filterByKey=function(t,e="isVisible"){return t.filter(t=>!y(e,t)||t[e])},exports.filterDuplicateByKey=function(t,e){return t.reduce((t,s)=>t.some(t=>t[e]===s[e])?t:[...t,s],[])},exports.filterEqualValues=b,exports.filterNullableValues=function(t){return t.filter(t=>!s(t))},exports.forceList=function(t){return n(t)?t:[t]},exports.getValueByKey=function(t,e,r){return s(t)?r:2===arguments.length?e[t]:e[t]??r},exports.hasEqualValues=function(t,e){return!!b(t,e).length},exports.hasKey=y,exports.isAnyObject=i,exports.isArray=n,exports.isArrayBuffer=a,exports.isArrayEmpty=function(t){return 0===t.length},exports.isBigint=t=>"bigint"==typeof t,exports.isBoolean=t=>"boolean"==typeof t,exports.isDate=p,exports.isError=h,exports.isFunction=d,exports.isMap=c,exports.isNaN=t=>Number.isNaN(t),exports.isNull=e,exports.isNullable=s,exports.isNumber=t=>"number"==typeof t,exports.isObject=o,exports.isObjectEmpty=function(t){for(const e in t)return!1;return!0},exports.isPromise=m,exports.isProxy=t=>t instanceof Proxy,exports.isRegExp=g,exports.isSet=u,exports.isString=r,exports.isSymbol=t=>"symbol"==typeof t,exports.isUndefined=t,exports.isWeakMap=l,exports.isWeakSet=f,exports.mapRecord=(t,e)=>{const s=Object.entries(t);return Object.fromEntries(s.map(([t,s],r,i)=>[t,e(t,s,r,i)]))},exports.runCallback=x,exports.throttle=(t,e)=>{let s=!0;return(...r)=>{s&&(x(t,...r),s=!1),setTimeout(()=>s=!0,e)}},exports.wait=(t=0)=>new Promise(e=>setTimeout(e,t));
1
+ "use strict";const t=t=>void 0===t,e=t=>null===t,s=s=>t(s)||e(s),r=t=>"string"==typeof t,i=t=>"object"==typeof t,o=t=>{const e=[n,a,c,u,l,f,p,h,g,m,d].some(e=>e(t));return!!t&&"object"==typeof t&&!e},n=t=>Array.isArray(t),a=t=>t instanceof ArrayBuffer,c=t=>t instanceof Map,u=t=>t instanceof Set,l=t=>t instanceof Map,f=t=>t instanceof Set,p=t=>t instanceof Date,h=t=>t instanceof Error,g=t=>t instanceof RegExp,m=t=>t instanceof Promise,d=t=>t instanceof Function;const x=(t,...e)=>{if(d(t))return t(...e)};function y(t,e){return!(!i(e)||!(t in e))}function b(t,e){return t.filter(t=>e.includes(t))}const E=()=>{let t=0;return(e="")=>`${e}${++t}`},v=E();class w{isDefaultPrevented=!1;constructor(){this.preventDefault=this.preventDefault.bind(this),this.overrideDefault=this.overrideDefault.bind(this)}preventDefault(){this.isDefaultPrevented=!0}overrideDefault(){this.isDefaultPrevented=!1}}class D{subscriptions={};constructor(){this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.clear=this.clear.bind(this)}emit(t,e,s){const r=this.subscriptions[t];if(r){const{event:t,listenerList:i}=r;i.forEach(s=>x(s,Object.assign(t,e))),t.isDefaultPrevented||x(s)}else x(s)}on(t,e){const s=this.subscriptions[t];return s?s.listenerList.push(e):this.subscriptions[t]={event:new w,listenerList:[e]},()=>this.off(t,e)}off(t,e){const s=this.subscriptions[t];if(s){const{event:r,listenerList:i}=s;this.subscriptions[t]={event:r,listenerList:i.filter(t=>t!==e)},r.overrideDefault()}}clear(t){delete this.subscriptions[t]}}const N=(t="?",...e)=>[`[${(t&&r(t)?t:"?").toUpperCase()}]`,...e.reduce((t,e,s,{length:r})=>{const i=s===r-1?[]:["|"];return t.push(e,...i),t},e.length?["-"]:[])];var k,S,L;!function(t){t.StartGroup="group",t.EndGroup="groupEnd",t.Default="log"}(k||(k={})),function(t){t.Info="%s",t.Success="%s",t.Warning="%s",t.Danger="%s"}(S||(S={}));class j{static formatted={info:(...t)=>j.info(...N(...t)),success:(...t)=>j.success(...N(...t)),warning:(...t)=>j.warning(...N(...t)),danger:(...t)=>j.danger(...N(...t))};static#t(t,...e){console[t](...e)}static startGroup(t,e,...s){j.#t(k.StartGroup,...((t,...e)=>["%c%s",t,...e])(`font-size: 16px;${e}`,...N(t,...s)))}static endGroup(){j.#t(k.EndGroup)}static info(...t){j.#t(k.Default,S.Info,...t)}static success(...t){j.#t(k.Default,S.Success,...t)}static warning(...t){j.#t(k.Default,S.Warning,...t)}static danger(...t){j.#t(k.Default,S.Danger,...t)}}exports.ErrorHandlerEventName=void 0,(L=exports.ErrorHandlerEventName||(exports.ErrorHandlerEventName={})).Capture="capture",L.Forward="forward";class O{static eventEmitter=new D;static caseList=[];static log(t,e={signal:"unknown"}){const{signal:s,message:r,payload:i,stack:o}=e,n=[r,h(t)?t.message:void 0].filter(Boolean);j.formatted.danger(s,...n,{error:t,payload:i,stack:o})}static get on(){return O.eventEmitter.on}static get off(){return O.eventEmitter.off}static get clear(){return O.eventEmitter.clear}static create(t,e){return new Error(t,{cause:e})}static throw(t,e){throw O.create(t,e)}static capture(t,e){O.log(t,e),O.eventEmitter.emit(exports.ErrorHandlerEventName.Capture,{error:t,config:e})}static forward(t,e){throw O.log(t,e),O.eventEmitter.emit(exports.ErrorHandlerEventName.Capture,{error:t,config:e}),t}static case(t){O.caseList.push(t)}static parse(t){const e={message:"Error!",status:0,errors:{},isExternal:!0};for(const{check:s,parse:r}of O.caseList)if(s(t,e))return r(t,e);return!0===h(t)?{message:t.message,status:e.status,errors:e.errors,isExternal:e.isExternal}:{message:e.message,status:e.status,errors:e.errors,isExternal:e.isExternal}}}class P{key;model;config;constructor(t,e,s){this.key=t,this.model=e,this.config=s}async get(t){const{defaultValue:e,withDebug:s}={...this.config,...t},r=await this.model.get(this.key),i=r&&JSON.parse(r)||e;return s&&j.formatted.info("get",this.key,i),i}async set(t,e){const{withDebug:s}={...this.config,...e};await this.model.set(this.key,JSON.stringify(t)),s&&j.formatted.info("set",this.key,t)}async delete(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});await this.model.delete(this.key),e&&j.formatted.info("delete",this.key,s)}async has(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});return e&&j.formatted.info("has",this.key,s),!!s}}exports.ErrorHandler=O,exports.EventEmitter=D,exports.Log=j,exports.Storage=class{model;config;constructor(t,e){this.model=t,this.config=e}async all(){O.throw("Not implemented")}async clear(){O.throw("Not implemented")}create(t){const e={[t]:new P(t,this.model,this.config)};return Object.assign(this,e)}},exports.chunkList=function(t,e){const s=[];for(let r=0;r<t.length;r+=e)s.push(t.slice(r,r+e));return s},exports.compose=function(t,e,r){const i=!o(t);return!s(r)&&{...e,...i?{[r]:t}:t}||!s(e)&&{...e,...t}||{...t}},exports.debounce=(t,e)=>{let s;return(...r)=>{s&&clearTimeout(s),s=setTimeout(()=>x(t,...r),e)}},exports.filterByKey=function(t,e="isVisible"){return t.filter(t=>!y(e,t)||t[e])},exports.filterDuplicateByKey=function(t,e){return t.reduce((t,s)=>t.some(t=>t[e]===s[e])?t:[...t,s],[])},exports.filterEqualValues=b,exports.filterNullableValues=function(t){return t.filter(t=>!s(t))},exports.forceList=function(t){return n(t)?t:[t]},exports.generateId=v,exports.generateIdFactory=E,exports.getValueByKey=function(t,e,r){return s(t)?r:2===arguments.length?e[t]:e[t]??r},exports.hasEqualValues=function(t,e){return!!b(t,e).length},exports.hasKey=y,exports.isAnyObject=i,exports.isArray=n,exports.isArrayBuffer=a,exports.isArrayEmpty=function(t){return 0===t.length},exports.isBigint=t=>"bigint"==typeof t,exports.isBoolean=t=>"boolean"==typeof t,exports.isDate=p,exports.isError=h,exports.isFunction=d,exports.isMap=c,exports.isNaN=t=>Number.isNaN(t),exports.isNull=e,exports.isNullable=s,exports.isNumber=t=>"number"==typeof t,exports.isObject=o,exports.isObjectEmpty=function(t){for(const e in t)return!1;return!0},exports.isPromise=m,exports.isProxy=t=>t instanceof Proxy,exports.isRegExp=g,exports.isSet=u,exports.isString=r,exports.isSymbol=t=>"symbol"==typeof t,exports.isUndefined=t,exports.isWeakMap=l,exports.isWeakSet=f,exports.mapRecord=(t,e)=>{const s=Object.entries(t);return Object.fromEntries(s.map(([t,s],r,i)=>[t,e(t,s,r,i)]))},exports.runCallback=x,exports.throttle=(t,e)=>{let s=!0;return(...r)=>{s&&(x(t,...r),s=!1),setTimeout(()=>s=!0,e)}},exports.wait=(t=0)=>new Promise(e=>setTimeout(e,t));
package/dist/index.d.ts CHANGED
@@ -910,6 +910,9 @@ declare function filterEqualValues<Item>(inputList: Item[], list: Item[]): Item[
910
910
  */
911
911
  declare function filterNullableValues<Item>(list: Item[]): NotNullable<Item>[];
912
912
 
913
+ declare const generateIdFactory: () => (prefix?: string) => string;
914
+ declare const generateId: (prefix?: string) => string;
915
+
913
916
  /**
914
917
  * Проверяет, что объект не содержит перечисляемых свойств.
915
918
  *
@@ -1239,5 +1242,5 @@ declare const isPromise: (param: unknown) => param is Promise<typeof param>;
1239
1242
  */
1240
1243
  declare const isFunction: <Callback = <ParamList extends BaseList, Result>(...paramList: ParamList) => Result>(param: unknown) => param is Callback;
1241
1244
 
1242
- export { ErrorHandler, ErrorHandlerEventName, EventEmitter, Log, Storage, chunkList, compose, debounce, filterByKey, filterDuplicateByKey, filterEqualValues, filterNullableValues, forceList, getValueByKey, hasEqualValues, hasKey, isAnyObject, isArray, isArrayBuffer, isArrayEmpty, isBigint, isBoolean, isDate, isError, isFunction, isMap, isNaN, isNull, isNullable, isNumber, isObject, isObjectEmpty, isPromise, isProxy, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, mapRecord, runCallback, throttle, wait };
1245
+ export { ErrorHandler, ErrorHandlerEventName, EventEmitter, Log, Storage, chunkList, compose, debounce, filterByKey, filterDuplicateByKey, filterEqualValues, filterNullableValues, forceList, generateId, generateIdFactory, getValueByKey, hasEqualValues, hasKey, isAnyObject, isArray, isArrayBuffer, isArrayEmpty, isBigint, isBoolean, isDate, isError, isFunction, isMap, isNaN, isNull, isNullable, isNumber, isObject, isObjectEmpty, isPromise, isProxy, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, mapRecord, runCallback, throttle, wait };
1243
1246
  export type { AnyAsyncCallback, AnyCallback, AsyncCallback, BaseKey, BaseList, BaseRecord, Callback, CallbackParamList, CallbackResult, Decrement, Divide, Entry, ErrorHandlerCaseConfig, ErrorHandlerConfig, ErrorHandlerError, ErrorHandlerErrors, ErrorHandlerEventParams, ErrorHandlerMessage, ErrorHandlerParseResult, Filled, Include, Increment, IterableOf, KeyOf, LevelRange, List, MaybeAsync, Noop, NotNullable, Nothing, Nullable, Numerable, Shared, SizeRange, StorageConfig, StorageInstance, StorageModel, ValueOf };
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const t=t=>void 0===t,e=t=>null===t,s=s=>t(s)||e(s),n=t=>"string"==typeof t,i=t=>"number"==typeof t,r=t=>"bigint"==typeof t,o=t=>Number.isNaN(t),a=t=>"boolean"==typeof t,c=t=>"symbol"==typeof t,u=t=>"object"==typeof t,f=t=>{const e=[l,h,g,m,d,p,b,y,D,v,E].some(e=>e(t));return!!t&&"object"==typeof t&&!e},l=t=>Array.isArray(t),h=t=>t instanceof ArrayBuffer,g=t=>t instanceof Map,m=t=>t instanceof Set,d=t=>t instanceof Map,p=t=>t instanceof Set,b=t=>t instanceof Date,y=t=>t instanceof Error,w=t=>t instanceof Proxy,D=t=>t instanceof RegExp,v=t=>t instanceof Promise,E=t=>t instanceof Function,k=(t=0)=>new Promise(e=>setTimeout(e,t));function x(t,e,n){const i=!f(t);return!s(n)&&{...e,...i?{[n]:t}:t}||!s(e)&&{...e,...t}||{...t}}function L(t,e,n){return s(t)?n:2===arguments.length?e[t]:e[t]??n}const S=(t,e)=>{const s=Object.entries(t);return Object.fromEntries(s.map(([t,s],n,i)=>[t,e(t,s,n,i)]))},N=(t,...e)=>{if(E(t))return t(...e)},P=(t,e)=>{let s;return(...n)=>{s&&clearTimeout(s),s=setTimeout(()=>N(t,...n),e)}},j=(t,e)=>{let s=!0;return(...n)=>{s&&(N(t,...n),s=!1),setTimeout(()=>s=!0,e)}};function G(t){for(const e in t)return!1;return!0}function O(t){return 0===t.length}function C(t,e){return!(!u(e)||!(t in e))}function T(t,e){return!!F(t,e).length}function A(t,e="isVisible"){return t.filter(t=>!C(e,t)||t[e])}function B(t,e){return t.reduce((t,s)=>t.some(t=>t[e]===s[e])?t:[...t,s],[])}function F(t,e){return t.filter(t=>e.includes(t))}function I(t){return t.filter(t=>!s(t))}function J(t){return l(t)?t:[t]}function M(t,e){const s=[];for(let n=0;n<t.length;n+=e)s.push(t.slice(n,n+e));return s}class V{isDefaultPrevented=!1;constructor(){this.preventDefault=this.preventDefault.bind(this),this.overrideDefault=this.overrideDefault.bind(this)}preventDefault(){this.isDefaultPrevented=!0}overrideDefault(){this.isDefaultPrevented=!1}}class W{subscriptions={};constructor(){this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.clear=this.clear.bind(this)}emit(t,e,s){const n=this.subscriptions[t];if(n){const{event:t,listenerList:i}=n;i.forEach(s=>N(s,Object.assign(t,e))),t.isDefaultPrevented||N(s)}else N(s)}on(t,e){const s=this.subscriptions[t];return s?s.listenerList.push(e):this.subscriptions[t]={event:new V,listenerList:[e]},()=>this.off(t,e)}off(t,e){const s=this.subscriptions[t];if(s){const{event:n,listenerList:i}=s;this.subscriptions[t]={event:n,listenerList:i.filter(t=>t!==e)},n.overrideDefault()}}clear(t){delete this.subscriptions[t]}}const $=(t="?",...e)=>[`[${(t&&n(t)?t:"?").toUpperCase()}]`,...e.reduce((t,e,s,{length:n})=>{const i=s===n-1?[]:["|"];return t.push(e,...i),t},e.length?["-"]:[])];var z,R,U;!function(t){t.StartGroup="group",t.EndGroup="groupEnd",t.Default="log"}(z||(z={})),function(t){t.Info="%s",t.Success="%s",t.Warning="%s",t.Danger="%s"}(R||(R={}));class q{static formatted={info:(...t)=>q.info(...$(...t)),success:(...t)=>q.success(...$(...t)),warning:(...t)=>q.warning(...$(...t)),danger:(...t)=>q.danger(...$(...t))};static#t(t,...e){console[t](...e)}static startGroup(t,e,...s){q.#t(z.StartGroup,...((t,...e)=>["%c%s",t,...e])(`font-size: 16px;${e}`,...$(t,...s)))}static endGroup(){q.#t(z.EndGroup)}static info(...t){q.#t(z.Default,R.Info,...t)}static success(...t){q.#t(z.Default,R.Success,...t)}static warning(...t){q.#t(z.Default,R.Warning,...t)}static danger(...t){q.#t(z.Default,R.Danger,...t)}}!function(t){t.Capture="capture",t.Forward="forward"}(U||(U={}));class H{static eventEmitter=new W;static caseList=[];static log(t,e={signal:"unknown"}){const{signal:s,message:n,payload:i,stack:r}=e,o=[n,y(t)?t.message:void 0].filter(Boolean);q.formatted.danger(s,...o,{error:t,payload:i,stack:r})}static get on(){return H.eventEmitter.on}static get off(){return H.eventEmitter.off}static get clear(){return H.eventEmitter.clear}static create(t,e){return new Error(t,{cause:e})}static throw(t,e){throw H.create(t,e)}static capture(t,e){H.log(t,e),H.eventEmitter.emit(U.Capture,{error:t,config:e})}static forward(t,e){throw H.log(t,e),H.eventEmitter.emit(U.Capture,{error:t,config:e}),t}static case(t){H.caseList.push(t)}static parse(t){const e={message:"Error!",status:0,errors:{},isExternal:!0};for(const{check:s,parse:n}of H.caseList)if(s(t,e))return n(t,e);return!0===y(t)?{message:t.message,status:e.status,errors:e.errors,isExternal:e.isExternal}:{message:e.message,status:e.status,errors:e.errors,isExternal:e.isExternal}}}class K{key;model;config;constructor(t,e,s){this.key=t,this.model=e,this.config=s}async get(t){const{defaultValue:e,withDebug:s}={...this.config,...t},n=await this.model.get(this.key),i=n&&JSON.parse(n)||e;return s&&q.formatted.info("get",this.key,i),i}async set(t,e){const{withDebug:s}={...this.config,...e};await this.model.set(this.key,JSON.stringify(t)),s&&q.formatted.info("set",this.key,t)}async delete(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});await this.model.delete(this.key),e&&q.formatted.info("delete",this.key,s)}async has(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});return e&&q.formatted.info("has",this.key,s),!!s}}class Q{model;config;constructor(t,e){this.model=t,this.config=e}async all(){H.throw("Not implemented")}async clear(){H.throw("Not implemented")}create(t){const e={[t]:new K(t,this.model,this.config)};return Object.assign(this,e)}}export{H as ErrorHandler,U as ErrorHandlerEventName,W as EventEmitter,q as Log,Q as Storage,M as chunkList,x as compose,P as debounce,A as filterByKey,B as filterDuplicateByKey,F as filterEqualValues,I as filterNullableValues,J as forceList,L as getValueByKey,T as hasEqualValues,C as hasKey,u as isAnyObject,l as isArray,h as isArrayBuffer,O as isArrayEmpty,r as isBigint,a as isBoolean,b as isDate,y as isError,E as isFunction,g as isMap,o as isNaN,e as isNull,s as isNullable,i as isNumber,f as isObject,G as isObjectEmpty,v as isPromise,w as isProxy,D as isRegExp,m as isSet,n as isString,c as isSymbol,t as isUndefined,d as isWeakMap,p as isWeakSet,S as mapRecord,N as runCallback,j as throttle,k as wait};
1
+ const t=t=>void 0===t,e=t=>null===t,s=s=>t(s)||e(s),n=t=>"string"==typeof t,i=t=>"number"==typeof t,r=t=>"bigint"==typeof t,o=t=>Number.isNaN(t),a=t=>"boolean"==typeof t,c=t=>"symbol"==typeof t,u=t=>"object"==typeof t,f=t=>{const e=[l,h,g,m,d,p,b,y,D,v,E].some(e=>e(t));return!!t&&"object"==typeof t&&!e},l=t=>Array.isArray(t),h=t=>t instanceof ArrayBuffer,g=t=>t instanceof Map,m=t=>t instanceof Set,d=t=>t instanceof Map,p=t=>t instanceof Set,b=t=>t instanceof Date,y=t=>t instanceof Error,w=t=>t instanceof Proxy,D=t=>t instanceof RegExp,v=t=>t instanceof Promise,E=t=>t instanceof Function,k=(t=0)=>new Promise(e=>setTimeout(e,t));function x(t,e,n){const i=!f(t);return!s(n)&&{...e,...i?{[n]:t}:t}||!s(e)&&{...e,...t}||{...t}}function L(t,e,n){return s(t)?n:2===arguments.length?e[t]:e[t]??n}const S=(t,e)=>{const s=Object.entries(t);return Object.fromEntries(s.map(([t,s],n,i)=>[t,e(t,s,n,i)]))},N=(t,...e)=>{if(E(t))return t(...e)},P=(t,e)=>{let s;return(...n)=>{s&&clearTimeout(s),s=setTimeout(()=>N(t,...n),e)}},j=(t,e)=>{let s=!0;return(...n)=>{s&&(N(t,...n),s=!1),setTimeout(()=>s=!0,e)}};function G(t){for(const e in t)return!1;return!0}function O(t){return 0===t.length}function C(t,e){return!(!u(e)||!(t in e))}function T(t,e){return!!B(t,e).length}function $(t,e="isVisible"){return t.filter(t=>!C(e,t)||t[e])}function A(t,e){return t.reduce((t,s)=>t.some(t=>t[e]===s[e])?t:[...t,s],[])}function B(t,e){return t.filter(t=>e.includes(t))}function F(t){return t.filter(t=>!s(t))}const I=()=>{let t=0;return(e="")=>`${e}${++t}`},J=I();function M(t){return l(t)?t:[t]}function V(t,e){const s=[];for(let n=0;n<t.length;n+=e)s.push(t.slice(n,n+e));return s}class W{isDefaultPrevented=!1;constructor(){this.preventDefault=this.preventDefault.bind(this),this.overrideDefault=this.overrideDefault.bind(this)}preventDefault(){this.isDefaultPrevented=!0}overrideDefault(){this.isDefaultPrevented=!1}}class z{subscriptions={};constructor(){this.emit=this.emit.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.clear=this.clear.bind(this)}emit(t,e,s){const n=this.subscriptions[t];if(n){const{event:t,listenerList:i}=n;i.forEach(s=>N(s,Object.assign(t,e))),t.isDefaultPrevented||N(s)}else N(s)}on(t,e){const s=this.subscriptions[t];return s?s.listenerList.push(e):this.subscriptions[t]={event:new W,listenerList:[e]},()=>this.off(t,e)}off(t,e){const s=this.subscriptions[t];if(s){const{event:n,listenerList:i}=s;this.subscriptions[t]={event:n,listenerList:i.filter(t=>t!==e)},n.overrideDefault()}}clear(t){delete this.subscriptions[t]}}const R=(t="?",...e)=>[`[${(t&&n(t)?t:"?").toUpperCase()}]`,...e.reduce((t,e,s,{length:n})=>{const i=s===n-1?[]:["|"];return t.push(e,...i),t},e.length?["-"]:[])];var U,q,H;!function(t){t.StartGroup="group",t.EndGroup="groupEnd",t.Default="log"}(U||(U={})),function(t){t.Info="%s",t.Success="%s",t.Warning="%s",t.Danger="%s"}(q||(q={}));class K{static formatted={info:(...t)=>K.info(...R(...t)),success:(...t)=>K.success(...R(...t)),warning:(...t)=>K.warning(...R(...t)),danger:(...t)=>K.danger(...R(...t))};static#t(t,...e){console[t](...e)}static startGroup(t,e,...s){K.#t(U.StartGroup,...((t,...e)=>["%c%s",t,...e])(`font-size: 16px;${e}`,...R(t,...s)))}static endGroup(){K.#t(U.EndGroup)}static info(...t){K.#t(U.Default,q.Info,...t)}static success(...t){K.#t(U.Default,q.Success,...t)}static warning(...t){K.#t(U.Default,q.Warning,...t)}static danger(...t){K.#t(U.Default,q.Danger,...t)}}!function(t){t.Capture="capture",t.Forward="forward"}(H||(H={}));class Q{static eventEmitter=new z;static caseList=[];static log(t,e={signal:"unknown"}){const{signal:s,message:n,payload:i,stack:r}=e,o=[n,y(t)?t.message:void 0].filter(Boolean);K.formatted.danger(s,...o,{error:t,payload:i,stack:r})}static get on(){return Q.eventEmitter.on}static get off(){return Q.eventEmitter.off}static get clear(){return Q.eventEmitter.clear}static create(t,e){return new Error(t,{cause:e})}static throw(t,e){throw Q.create(t,e)}static capture(t,e){Q.log(t,e),Q.eventEmitter.emit(H.Capture,{error:t,config:e})}static forward(t,e){throw Q.log(t,e),Q.eventEmitter.emit(H.Capture,{error:t,config:e}),t}static case(t){Q.caseList.push(t)}static parse(t){const e={message:"Error!",status:0,errors:{},isExternal:!0};for(const{check:s,parse:n}of Q.caseList)if(s(t,e))return n(t,e);return!0===y(t)?{message:t.message,status:e.status,errors:e.errors,isExternal:e.isExternal}:{message:e.message,status:e.status,errors:e.errors,isExternal:e.isExternal}}}class X{key;model;config;constructor(t,e,s){this.key=t,this.model=e,this.config=s}async get(t){const{defaultValue:e,withDebug:s}={...this.config,...t},n=await this.model.get(this.key),i=n&&JSON.parse(n)||e;return s&&K.formatted.info("get",this.key,i),i}async set(t,e){const{withDebug:s}={...this.config,...e};await this.model.set(this.key,JSON.stringify(t)),s&&K.formatted.info("set",this.key,t)}async delete(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});await this.model.delete(this.key),e&&K.formatted.info("delete",this.key,s)}async has(t){const{withDebug:e}={...this.config,...t},s=await this.get({...t,withDebug:!1});return e&&K.formatted.info("has",this.key,s),!!s}}class Y{model;config;constructor(t,e){this.model=t,this.config=e}async all(){Q.throw("Not implemented")}async clear(){Q.throw("Not implemented")}create(t){const e={[t]:new X(t,this.model,this.config)};return Object.assign(this,e)}}export{Q as ErrorHandler,H as ErrorHandlerEventName,z as EventEmitter,K as Log,Y as Storage,V as chunkList,x as compose,P as debounce,$ as filterByKey,A as filterDuplicateByKey,B as filterEqualValues,F as filterNullableValues,M as forceList,J as generateId,I as generateIdFactory,L as getValueByKey,T as hasEqualValues,C as hasKey,u as isAnyObject,l as isArray,h as isArrayBuffer,O as isArrayEmpty,r as isBigint,a as isBoolean,b as isDate,y as isError,E as isFunction,g as isMap,o as isNaN,e as isNull,s as isNullable,i as isNumber,f as isObject,G as isObjectEmpty,v as isPromise,w as isProxy,D as isRegExp,m as isSet,n as isString,c as isSymbol,t as isUndefined,d as isWeakMap,p as isWeakSet,S as mapRecord,N as runCallback,j as throttle,k as wait};
@@ -1 +1 @@
1
- "use strict";const e=e=>void 0===e,t=e=>null===e,r=r=>e(r)||t(r),s=e=>"object"==typeof e,o=e=>{const t=[n,i,p,u,c,f,a,x,l,y,m].some(t=>t(e));return!!e&&"object"==typeof e&&!t},n=e=>Array.isArray(e),i=e=>e instanceof ArrayBuffer,p=e=>e instanceof Map,u=e=>e instanceof Set,c=e=>e instanceof Map,f=e=>e instanceof Set,a=e=>e instanceof Date,x=e=>e instanceof Error,l=e=>e instanceof RegExp,y=e=>e instanceof Promise,m=e=>e instanceof Function;const b=(e,...t)=>{if(m(e))return e(...t)};function g(e,t){return!(!s(t)||!(e in t))}function h(e,t){return e.filter(e=>t.includes(e))}exports.chunkList=function(e,t){const r=[];for(let s=0;s<e.length;s+=t)r.push(e.slice(s,s+t));return r},exports.compose=function(e,t,s){const n=!o(e);return!r(s)&&{...t,...n?{[s]:e}:e}||!r(t)&&{...t,...e}||{...e}},exports.debounce=(e,t)=>{let r;return(...s)=>{r&&clearTimeout(r),r=setTimeout(()=>b(e,...s),t)}},exports.filterByKey=function(e,t="isVisible"){return e.filter(e=>!g(t,e)||e[t])},exports.filterDuplicateByKey=function(e,t){return e.reduce((e,r)=>e.some(e=>e[t]===r[t])?e:[...e,r],[])},exports.filterEqualValues=h,exports.filterNullableValues=function(e){return e.filter(e=>!r(e))},exports.forceList=function(e){return n(e)?e:[e]},exports.getValueByKey=function(e,t,s){return r(e)?s:2===arguments.length?t[e]:t[e]??s},exports.hasEqualValues=function(e,t){return!!h(e,t).length},exports.hasKey=g,exports.isAnyObject=s,exports.isArray=n,exports.isArrayBuffer=i,exports.isArrayEmpty=function(e){return 0===e.length},exports.isBigint=e=>"bigint"==typeof e,exports.isBoolean=e=>"boolean"==typeof e,exports.isDate=a,exports.isError=x,exports.isFunction=m,exports.isMap=p,exports.isNaN=e=>Number.isNaN(e),exports.isNull=t,exports.isNullable=r,exports.isNumber=e=>"number"==typeof e,exports.isObject=o,exports.isObjectEmpty=function(e){for(const t in e)return!1;return!0},exports.isPromise=y,exports.isProxy=e=>e instanceof Proxy,exports.isRegExp=l,exports.isSet=u,exports.isString=e=>"string"==typeof e,exports.isSymbol=e=>"symbol"==typeof e,exports.isUndefined=e,exports.isWeakMap=c,exports.isWeakSet=f,exports.mapRecord=(e,t)=>{const r=Object.entries(e);return Object.fromEntries(r.map(([e,r],s,o)=>[e,t(e,r,s,o)]))},exports.runCallback=b,exports.throttle=(e,t)=>{let r=!0;return(...s)=>{r&&(b(e,...s),r=!1),setTimeout(()=>r=!0,t)}},exports.wait=(e=0)=>new Promise(t=>setTimeout(t,e));
1
+ "use strict";const e=e=>void 0===e,t=e=>null===e,r=r=>e(r)||t(r),s=e=>"object"==typeof e,o=e=>{const t=[n,i,p,u,c,a,f,x,l,y,m].some(t=>t(e));return!!e&&"object"==typeof e&&!t},n=e=>Array.isArray(e),i=e=>e instanceof ArrayBuffer,p=e=>e instanceof Map,u=e=>e instanceof Set,c=e=>e instanceof Map,a=e=>e instanceof Set,f=e=>e instanceof Date,x=e=>e instanceof Error,l=e=>e instanceof RegExp,y=e=>e instanceof Promise,m=e=>e instanceof Function;const b=(e,...t)=>{if(m(e))return e(...t)};function g(e,t){return!(!s(t)||!(e in t))}function d(e,t){return e.filter(e=>t.includes(e))}const h=()=>{let e=0;return(t="")=>`${t}${++e}`},E=h();exports.chunkList=function(e,t){const r=[];for(let s=0;s<e.length;s+=t)r.push(e.slice(s,s+t));return r},exports.compose=function(e,t,s){const n=!o(e);return!r(s)&&{...t,...n?{[s]:e}:e}||!r(t)&&{...t,...e}||{...e}},exports.debounce=(e,t)=>{let r;return(...s)=>{r&&clearTimeout(r),r=setTimeout(()=>b(e,...s),t)}},exports.filterByKey=function(e,t="isVisible"){return e.filter(e=>!g(t,e)||e[t])},exports.filterDuplicateByKey=function(e,t){return e.reduce((e,r)=>e.some(e=>e[t]===r[t])?e:[...e,r],[])},exports.filterEqualValues=d,exports.filterNullableValues=function(e){return e.filter(e=>!r(e))},exports.forceList=function(e){return n(e)?e:[e]},exports.generateId=E,exports.generateIdFactory=h,exports.getValueByKey=function(e,t,s){return r(e)?s:2===arguments.length?t[e]:t[e]??s},exports.hasEqualValues=function(e,t){return!!d(e,t).length},exports.hasKey=g,exports.isAnyObject=s,exports.isArray=n,exports.isArrayBuffer=i,exports.isArrayEmpty=function(e){return 0===e.length},exports.isBigint=e=>"bigint"==typeof e,exports.isBoolean=e=>"boolean"==typeof e,exports.isDate=f,exports.isError=x,exports.isFunction=m,exports.isMap=p,exports.isNaN=e=>Number.isNaN(e),exports.isNull=t,exports.isNullable=r,exports.isNumber=e=>"number"==typeof e,exports.isObject=o,exports.isObjectEmpty=function(e){for(const t in e)return!1;return!0},exports.isPromise=y,exports.isProxy=e=>e instanceof Proxy,exports.isRegExp=l,exports.isSet=u,exports.isString=e=>"string"==typeof e,exports.isSymbol=e=>"symbol"==typeof e,exports.isUndefined=e,exports.isWeakMap=c,exports.isWeakSet=a,exports.mapRecord=(e,t)=>{const r=Object.entries(e);return Object.fromEntries(r.map(([e,r],s,o)=>[e,t(e,r,s,o)]))},exports.runCallback=b,exports.throttle=(e,t)=>{let r=!0;return(...s)=>{r&&(b(e,...s),r=!1),setTimeout(()=>r=!0,t)}},exports.wait=(e=0)=>new Promise(t=>setTimeout(t,e));
@@ -255,6 +255,9 @@ declare function filterEqualValues<Item>(inputList: Item[], list: Item[]): Item[
255
255
  */
256
256
  declare function filterNullableValues<Item>(list: Item[]): NotNullable<Item>[];
257
257
 
258
+ declare const generateIdFactory: () => (prefix?: string) => string;
259
+ declare const generateId: (prefix?: string) => string;
260
+
258
261
  /**
259
262
  * Проверяет, что объект не содержит перечисляемых свойств.
260
263
  *
@@ -584,4 +587,4 @@ declare const isPromise: (param: unknown) => param is Promise<typeof param>;
584
587
  */
585
588
  declare const isFunction: <Callback = <ParamList extends BaseList, Result>(...paramList: ParamList) => Result>(param: unknown) => param is Callback;
586
589
 
587
- export { chunkList, compose, debounce, filterByKey, filterDuplicateByKey, filterEqualValues, filterNullableValues, forceList, getValueByKey, hasEqualValues, hasKey, isAnyObject, isArray, isArrayBuffer, isArrayEmpty, isBigint, isBoolean, isDate, isError, isFunction, isMap, isNaN, isNull, isNullable, isNumber, isObject, isObjectEmpty, isPromise, isProxy, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, mapRecord, runCallback, throttle, wait };
590
+ export { chunkList, compose, debounce, filterByKey, filterDuplicateByKey, filterEqualValues, filterNullableValues, forceList, generateId, generateIdFactory, getValueByKey, hasEqualValues, hasKey, isAnyObject, isArray, isArrayBuffer, isArrayEmpty, isBigint, isBoolean, isDate, isError, isFunction, isMap, isNaN, isNull, isNullable, isNumber, isObject, isObjectEmpty, isPromise, isProxy, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, mapRecord, runCallback, throttle, wait };
@@ -1 +1 @@
1
- const n=n=>void 0===n,t=n=>null===n,e=e=>n(e)||t(e),r=n=>"string"==typeof n,o=n=>"number"==typeof n,i=n=>"bigint"==typeof n,u=n=>Number.isNaN(n),c=n=>"boolean"==typeof n,f=n=>"symbol"==typeof n,s=n=>"object"==typeof n,a=n=>{const t=[l,m,p,y,b,g,h,j,d,x,A].some(t=>t(n));return!!n&&"object"==typeof n&&!t},l=n=>Array.isArray(n),m=n=>n instanceof ArrayBuffer,p=n=>n instanceof Map,y=n=>n instanceof Set,b=n=>n instanceof Map,g=n=>n instanceof Set,h=n=>n instanceof Date,j=n=>n instanceof Error,T=n=>n instanceof Proxy,d=n=>n instanceof RegExp,x=n=>n instanceof Promise,A=n=>n instanceof Function,E=(n=0)=>new Promise(t=>setTimeout(t,n));function N(n,t,r){const o=!a(n);return!e(r)&&{...t,...o?{[r]:n}:n}||!e(t)&&{...t,...n}||{...n}}function P(n,t,r){return e(n)?r:2===arguments.length?t[n]:t[n]??r}const M=(n,t)=>{const e=Object.entries(n);return Object.fromEntries(e.map(([n,e],r,o)=>[n,t(n,e,r,o)]))},O=(n,...t)=>{if(A(n))return n(...t)},S=(n,t)=>{let e;return(...r)=>{e&&clearTimeout(e),e=setTimeout(()=>O(n,...r),t)}},v=(n,t)=>{let e=!0;return(...r)=>{e&&(O(n,...r),e=!1),setTimeout(()=>e=!0,t)}};function w(n){for(const t in n)return!1;return!0}function B(n){return 0===n.length}function D(n,t){return!(!s(t)||!(n in t))}function F(n,t){return!!k(n,t).length}function R(n,t="isVisible"){return n.filter(n=>!D(t,n)||n[t])}function V(n,t){return n.reduce((n,e)=>n.some(n=>n[t]===e[t])?n:[...n,e],[])}function k(n,t){return n.filter(n=>t.includes(n))}function q(n){return n.filter(n=>!e(n))}function z(n){return l(n)?n:[n]}function C(n,t){const e=[];for(let r=0;r<n.length;r+=t)e.push(n.slice(r,r+t));return e}export{C as chunkList,N as compose,S as debounce,R as filterByKey,V as filterDuplicateByKey,k as filterEqualValues,q as filterNullableValues,z as forceList,P as getValueByKey,F as hasEqualValues,D as hasKey,s as isAnyObject,l as isArray,m as isArrayBuffer,B as isArrayEmpty,i as isBigint,c as isBoolean,h as isDate,j as isError,A as isFunction,p as isMap,u as isNaN,t as isNull,e as isNullable,o as isNumber,a as isObject,w as isObjectEmpty,x as isPromise,T as isProxy,d as isRegExp,y as isSet,r as isString,f as isSymbol,n as isUndefined,b as isWeakMap,g as isWeakSet,M as mapRecord,O as runCallback,v as throttle,E as wait};
1
+ const n=n=>void 0===n,t=n=>null===n,e=e=>n(e)||t(e),r=n=>"string"==typeof n,o=n=>"number"==typeof n,i=n=>"bigint"==typeof n,u=n=>Number.isNaN(n),c=n=>"boolean"==typeof n,f=n=>"symbol"==typeof n,s=n=>"object"==typeof n,a=n=>{const t=[l,m,p,y,b,g,h,j,d,x,A].some(t=>t(n));return!!n&&"object"==typeof n&&!t},l=n=>Array.isArray(n),m=n=>n instanceof ArrayBuffer,p=n=>n instanceof Map,y=n=>n instanceof Set,b=n=>n instanceof Map,g=n=>n instanceof Set,h=n=>n instanceof Date,j=n=>n instanceof Error,T=n=>n instanceof Proxy,d=n=>n instanceof RegExp,x=n=>n instanceof Promise,A=n=>n instanceof Function,E=(n=0)=>new Promise(t=>setTimeout(t,n));function N(n,t,r){const o=!a(n);return!e(r)&&{...t,...o?{[r]:n}:n}||!e(t)&&{...t,...n}||{...n}}function P(n,t,r){return e(n)?r:2===arguments.length?t[n]:t[n]??r}const M=(n,t)=>{const e=Object.entries(n);return Object.fromEntries(e.map(([n,e],r,o)=>[n,t(n,e,r,o)]))},O=(n,...t)=>{if(A(n))return n(...t)},S=(n,t)=>{let e;return(...r)=>{e&&clearTimeout(e),e=setTimeout(()=>O(n,...r),t)}},$=(n,t)=>{let e=!0;return(...r)=>{e&&(O(n,...r),e=!1),setTimeout(()=>e=!0,t)}};function v(n){for(const t in n)return!1;return!0}function w(n){return 0===n.length}function B(n,t){return!(!s(t)||!(n in t))}function D(n,t){return!!V(n,t).length}function F(n,t="isVisible"){return n.filter(n=>!B(t,n)||n[t])}function R(n,t){return n.reduce((n,e)=>n.some(n=>n[t]===e[t])?n:[...n,e],[])}function V(n,t){return n.filter(n=>t.includes(n))}function k(n){return n.filter(n=>!e(n))}const q=()=>{let n=0;return(t="")=>`${t}${++n}`},z=q();function C(n){return l(n)?n:[n]}function G(n,t){const e=[];for(let r=0;r<n.length;r+=t)e.push(n.slice(r,r+t));return e}export{G as chunkList,N as compose,S as debounce,F as filterByKey,R as filterDuplicateByKey,V as filterEqualValues,k as filterNullableValues,C as forceList,z as generateId,q as generateIdFactory,P as getValueByKey,D as hasEqualValues,B as hasKey,s as isAnyObject,l as isArray,m as isArrayBuffer,w as isArrayEmpty,i as isBigint,c as isBoolean,h as isDate,j as isError,A as isFunction,p as isMap,u as isNaN,t as isNull,e as isNullable,o as isNumber,a as isObject,v as isObjectEmpty,x as isPromise,T as isProxy,d as isRegExp,y as isSet,r as isString,f as isSymbol,n as isUndefined,b as isWeakMap,g as isWeakSet,M as mapRecord,O as runCallback,$ as throttle,E as wait};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "private": false,
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "name": "@mediacubeco/base",
5
5
  "description": "Base by Mediacube developers",
6
6
  "license": "MIT",
@@ -16,10 +16,10 @@
16
16
  "devDependencies": {
17
17
  "eslint": "^9.39.1",
18
18
  "prettier": "^3.8.1",
19
- "typescript": "^5.9.3",
20
- "@mediacubeco/eslint-config": "2.0.0",
21
- "@mediacubeco/typescript-config": "2.0.0",
22
- "@mediacubeco/prettier-config": "2.0.0"
19
+ "typescript": "^6.0.3",
20
+ "@mediacubeco/eslint-config": "2.0.2",
21
+ "@mediacubeco/prettier-config": "2.0.2",
22
+ "@mediacubeco/typescript-config": "2.0.2"
23
23
  },
24
24
  "exports": {
25
25
  ".": {