- Go backend (server/)
- Frontend (web/, server/static/)
- Database and deployment files
- Scripts and docs
Co-Authored-By: 狸花猫/Claude-Qwen3.6-Plus 🐾
16 lines
564 B
JavaScript
16 lines
564 B
JavaScript
export const isString = (val) => typeof val === 'string';
|
|
const cacheStringFunction = (fn) => {
|
|
const cache = Object.create(null);
|
|
return ((str) => {
|
|
const hit = cache[str];
|
|
return hit || (cache[str] = fn(str));
|
|
});
|
|
};
|
|
const camelizeRE = /-(\w)/g;
|
|
export const camelize = cacheStringFunction((str) => {
|
|
return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
|
|
});
|
|
// export const capitalize = cacheStringFunction(
|
|
// (str: string) => str.charAt(0).toUpperCase() + str.slice(1),
|
|
// )
|
|
//# sourceMappingURL=string.js.map
|