@budsbox/iso-utils
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -1,2 +0,3 @@ | ||
import type { Def, FilterByType, OmitNilProps, Value } from '@budsbox/types'; | ||
import type { Def } from '@budsbox/types'; | ||
import type { FilterByType, OmitNilProps, Value } from '@budsbox/types/object'; | ||
export declare function filterBy<T, K extends string, R extends Def<T>>(value: Partial<Record<K, T>>, test: (value: T) => value is R): FilterByType<Record<K, T>, R>; | ||
@@ -3,0 +4,0 @@ export declare function filterBy<T, K extends string, R extends T>(value: Partial<Record<K, T>> | Record<K, T>, test: (value: T) => value is R): FilterByType<Record<K, T>, R>; |
import type { Maybe } from '@budsbox/types'; | ||
import type { CamelCase } from '@budsbox/types/string'; | ||
type ClassNameKey = string | number; | ||
@@ -16,3 +17,5 @@ export type ClassNameArg = Maybe<ClassNameKey | Readonly<Record<ClassNameKey, boolean>> | readonly ClassNameArg[]>; | ||
export declare function debugString(value: unknown): string; | ||
export declare function camelCase<T extends string>(str: T): CamelCase<T>; | ||
export declare function camelCase(str: string): string; | ||
export {}; | ||
//# sourceMappingURL=string.d.ts.map |
@@ -6,2 +6,3 @@ "use strict"; | ||
exports.debugString = debugString; | ||
exports.camelCase = camelCase; | ||
const object_js_1 = require("./object.js"); | ||
@@ -46,2 +47,5 @@ const type_guards_js_1 = require("./type-guards.js"); | ||
} | ||
function camelCase(name) { | ||
return name.replace(/[-_]([^-_])/g, (_, right) => right.toUpperCase()); | ||
} | ||
//# sourceMappingURL=string.js.map |
@@ -1,2 +0,3 @@ | ||
import type { Def, FilterByType, OmitNilProps, Value } from '@budsbox/types'; | ||
import type { Def } from '@budsbox/types'; | ||
import type { FilterByType, OmitNilProps, Value } from '@budsbox/types/object'; | ||
export declare function filterBy<T, K extends string, R extends Def<T>>(value: Partial<Record<K, T>>, test: (value: T) => value is R): FilterByType<Record<K, T>, R>; | ||
@@ -3,0 +4,0 @@ export declare function filterBy<T, K extends string, R extends T>(value: Partial<Record<K, T>> | Record<K, T>, test: (value: T) => value is R): FilterByType<Record<K, T>, R>; |
import type { Maybe } from '@budsbox/types'; | ||
import type { CamelCase } from '@budsbox/types/string'; | ||
type ClassNameKey = string | number; | ||
@@ -16,3 +17,5 @@ export type ClassNameArg = Maybe<ClassNameKey | Readonly<Record<ClassNameKey, boolean>> | readonly ClassNameArg[]>; | ||
export declare function debugString(value: unknown): string; | ||
export declare function camelCase<T extends string>(str: T): CamelCase<T>; | ||
export declare function camelCase(str: string): string; | ||
export {}; | ||
//# sourceMappingURL=string.d.ts.map |
@@ -40,2 +40,5 @@ import { filterBy } from './object.js'; | ||
} | ||
export function camelCase(name) { | ||
return name.replace(/[-_]([^-_])/g, (_, right) => right.toUpperCase()); | ||
} | ||
//# sourceMappingURL=string.js.map |
{ | ||
"name": "@budsbox/iso-utils", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "isomorphic (aka runtime-agnostic/independent) utilities", | ||
@@ -100,3 +100,5 @@ "homepage": "https://gitlab.com/budsbox/fe/seed", | ||
"files": [ | ||
"dist" | ||
"dist/**/*.d.ts", | ||
"dist/**/*.js", | ||
"dist/cjs/package.json" | ||
], | ||
@@ -107,6 +109,6 @@ "scripts": { | ||
"dependencies": { | ||
"@budsbox/types": "^1.1.0" | ||
"@budsbox/types": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@budsbox/linting": "^1.3.1", | ||
"@budsbox/linting": "^1.3.2", | ||
"@budsbox/tsconfigs": "^3.0.0", | ||
@@ -113,0 +115,0 @@ "@eslint/js": "^9.9.1", |
457
22365
18
+ Added@budsbox/types@2.0.0(transitive)
- Removed@budsbox/types@1.1.0(transitive)
Updated@budsbox/types@^2.0.0