@94ai/common-utils
Advanced tools
Comparing version 100.1.17 to 100.1.19
"use strict"; | ||
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); | ||
const util = require("./tool.cjs.cjs"); | ||
const util = require("../tool-ffb1fdf8.cjs"); | ||
require("fs"); | ||
require("path"); | ||
exports.CachedManager = util.CachedManager; | ||
exports.ComponentConstantList = util.ComponentConstantList; | ||
@@ -7,0 +8,0 @@ exports.HexToRgb = util.HexToRgb; |
@@ -1,35 +0,36 @@ | ||
import { ComponentConstantList, HexToRgb, RgbToHex, _getComputedStyle, createUniqueString, debounce, deepClone, endOf, formatDate, generateID, generateUUID, getBlobURL, getCharStringLength, getDarkColor, getDirs, getFlexDirection, getHalfYear, getJsComponentSampleConfig, getLightColor, getNextYear, getQuarter, getTranspileDependencies, getTsComponentSampleConfig, isAutoFlexBasis, kebabCase, startOf, toBase64, toLine, toPascalCase, upperCamelCase } from "./tool.esm-bundler.mjs"; | ||
import { D, E, H, R, _, j, i, h, o, p, A, e, y, f, q, g, x, l, c, t, n, m, a, d, w, k, s, z, u, C, v } from "../tool-6cdf3a46.js"; | ||
import "fs"; | ||
import "path"; | ||
export { | ||
ComponentConstantList, | ||
HexToRgb, | ||
RgbToHex, | ||
_getComputedStyle, | ||
createUniqueString, | ||
debounce, | ||
deepClone, | ||
endOf, | ||
formatDate, | ||
generateID, | ||
generateUUID, | ||
getBlobURL, | ||
getCharStringLength, | ||
getDarkColor, | ||
getDirs, | ||
getFlexDirection, | ||
getHalfYear, | ||
getJsComponentSampleConfig, | ||
getLightColor, | ||
getNextYear, | ||
getQuarter, | ||
getTranspileDependencies, | ||
getTsComponentSampleConfig, | ||
isAutoFlexBasis, | ||
kebabCase, | ||
startOf, | ||
toBase64, | ||
toLine, | ||
toPascalCase, | ||
upperCamelCase | ||
D as CachedManager, | ||
E as ComponentConstantList, | ||
H as HexToRgb, | ||
R as RgbToHex, | ||
_ as _getComputedStyle, | ||
j as createUniqueString, | ||
i as debounce, | ||
h as deepClone, | ||
o as endOf, | ||
p as formatDate, | ||
A as generateID, | ||
e as generateUUID, | ||
y as getBlobURL, | ||
f as getCharStringLength, | ||
q as getDarkColor, | ||
g as getDirs, | ||
x as getFlexDirection, | ||
l as getHalfYear, | ||
c as getJsComponentSampleConfig, | ||
t as getLightColor, | ||
n as getNextYear, | ||
m as getQuarter, | ||
a as getTranspileDependencies, | ||
d as getTsComponentSampleConfig, | ||
w as isAutoFlexBasis, | ||
k as kebabCase, | ||
s as startOf, | ||
z as toBase64, | ||
u as toLine, | ||
C as toPascalCase, | ||
v as upperCamelCase | ||
}; |
import { ComponentConstantList } from './const'; | ||
import { getDirs, getTsComponentSampleConfig, getJsComponentSampleConfig, getTranspileDependencies, kebabCase, getCharStringLength, generateUUID, deepClone, debounce, getHalfYear, getQuarter, getNextYear, endOf, startOf, formatDate, createUniqueString, RgbToHex, getDarkColor, getLightColor, HexToRgb, toLine, getFlexDirection, _getComputedStyle, isAutoFlexBasis, upperCamelCase, getBlobURL, toBase64, generateID, toPascalCase } from './util'; | ||
export { getTsComponentSampleConfig, getJsComponentSampleConfig, getTranspileDependencies, kebabCase, getDirs, ComponentConstantList, getCharStringLength, generateUUID, deepClone, debounce, getQuarter, getNextYear, endOf, startOf, formatDate, getHalfYear, createUniqueString, RgbToHex, getDarkColor, getLightColor, HexToRgb, toLine, getFlexDirection, _getComputedStyle, isAutoFlexBasis, upperCamelCase, getBlobURL, toBase64, generateID, toPascalCase }; | ||
import { getDirs, getTsComponentSampleConfig, getJsComponentSampleConfig, getTranspileDependencies, kebabCase, getCharStringLength, generateUUID, deepClone, debounce, getHalfYear, getQuarter, getNextYear, endOf, startOf, formatDate, createUniqueString, RgbToHex, getDarkColor, getLightColor, HexToRgb, toLine, getFlexDirection, _getComputedStyle, isAutoFlexBasis, upperCamelCase, getBlobURL, toBase64, generateID, toPascalCase, CachedManager } from './util'; | ||
export { CachedManager, getTsComponentSampleConfig, getJsComponentSampleConfig, getTranspileDependencies, kebabCase, getDirs, ComponentConstantList, getCharStringLength, generateUUID, deepClone, debounce, getQuarter, getNextYear, endOf, startOf, formatDate, getHalfYear, createUniqueString, RgbToHex, getDarkColor, getLightColor, HexToRgb, toLine, getFlexDirection, _getComputedStyle, isAutoFlexBasis, upperCamelCase, getBlobURL, toBase64, generateID, toPascalCase }; |
@@ -54,1 +54,8 @@ export declare function resolveDebuger(name: any): void; | ||
export declare function toPascalCase(str: any): any; | ||
export declare class CachedManager { | ||
static cachedEntitys: {}; | ||
static asyncCachedGet(key: any): Promise<any>; | ||
static syncCachedGet(key: any): any; | ||
static asyncCachedSet(key: any, value: any): Promise<void>; | ||
static syncCachedSet(key: any, value: any): void; | ||
} |
{ | ||
"name": "@94ai/common-utils", | ||
"version": "100.1.17", | ||
"version": "100.1.19", | ||
"description": "> TODO: description", | ||
@@ -10,3 +10,3 @@ "keywords": [], | ||
"dependencies": { | ||
"@94ai/nf-theme-chalk": "^100.1.17", | ||
"@94ai/nf-theme-chalk": "^100.1.19", | ||
"lodash-es": "^4.17.21", | ||
@@ -13,0 +13,0 @@ "vue-demi": "^0.14.5" |
@@ -31,3 +31,4 @@ import { ComponentConstantList } from './const' | ||
generateID, | ||
toPascalCase | ||
toPascalCase, | ||
CachedManager | ||
} from './util' | ||
@@ -37,2 +38,3 @@ | ||
export { | ||
CachedManager, | ||
getTsComponentSampleConfig, | ||
@@ -39,0 +41,0 @@ getJsComponentSampleConfig, |
@@ -5,2 +5,6 @@ import fs from 'fs' | ||
import { ComponentConstantList, presudos } from './const' | ||
import { | ||
get, | ||
set | ||
} from 'idb-keyval' | ||
@@ -405,1 +409,34 @@ export function resolveDebuger(name) { | ||
} | ||
export class CachedManager { | ||
static cachedEntitys = {} | ||
static async asyncCachedGet(key) { | ||
if (!this.cachedEntitys[key]) { | ||
this.cachedEntitys[key] = await get(key) | ||
} | ||
return this.cachedEntitys[key] | ||
} | ||
static syncCachedGet(key) { | ||
return this.cachedEntitys[key] | ||
} | ||
static async asyncCachedSet(key, value) { | ||
this.cachedEntitys[key] = value | ||
await set(key, value) | ||
} | ||
static syncCachedSet(key,value) { | ||
this.cachedEntitys[key] = value | ||
set(key, value) | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
53981
27
1736
9
1