@axelarjs/utils
Advanced tools
Comparing version 0.0.0-snapshot.2897c97 to 0.0.0-snapshot.2f6e7cb
import type { AnyRecord, PluralizeKeys } from "./types"; | ||
export declare const caseInsensitiveRecord: <T>(record: Record<string, T>) => Record<string, T>; | ||
export declare function pluralizeKeys<T extends AnyRecord>(obj: T): PluralizeKeys<T>; | ||
export declare const invert: <T extends Record<string, string>>(obj: T) => { [K in keyof T as T[K]]: K; }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pluralizeKeys = exports.caseInsensitiveRecord = void 0; | ||
exports.invert = exports.pluralizeKeys = exports.caseInsensitiveRecord = void 0; | ||
const caseInsensitiveRecord = (record) => new Proxy(record, { | ||
@@ -25,1 +25,3 @@ get(target, p) { | ||
exports.pluralizeKeys = pluralizeKeys; | ||
const invert = (obj) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [v, k])); | ||
exports.invert = invert; |
import type { AnyRecord, PluralizeKeys } from "./types"; | ||
export declare const caseInsensitiveRecord: <T>(record: Record<string, T>) => Record<string, T>; | ||
export declare function pluralizeKeys<T extends AnyRecord>(obj: T): PluralizeKeys<T>; | ||
export declare const invert: <T extends Record<string, string>>(obj: T) => { [K in keyof T as T[K]]: K; }; |
@@ -20,1 +20,2 @@ export const caseInsensitiveRecord = (record) => new Proxy(record, { | ||
} | ||
export const invert = (obj) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [v, k])); |
{ | ||
"name": "@axelarjs/utils", | ||
"version": "0.0.0-snapshot.2897c97", | ||
"version": "0.0.0-snapshot.2f6e7cb", | ||
"publishConfig": { | ||
@@ -57,23 +57,23 @@ "access": "public" | ||
"@testing-library/jest-dom": "^5.17.0", | ||
"@testing-library/react": "^14.0.0", | ||
"@testing-library/react": "^14.1.2", | ||
"@tsconfig/strictest": "^2.0.2", | ||
"@types/lodash.debounce": "^4.0.8", | ||
"@types/lodash.throttle": "^4.1.8", | ||
"@types/node": "^20.8.10", | ||
"@types/ramda": "^0.29.7", | ||
"@types/lodash.debounce": "^4.0.9", | ||
"@types/lodash.throttle": "^4.1.9", | ||
"@types/node": "^20.11.5", | ||
"@types/ramda": "^0.29.10", | ||
"@types/react": "18.2.21", | ||
"@types/react-dom": "18.2.7", | ||
"@types/testing-library__jest-dom": "^5.14.9", | ||
"@vitejs/plugin-react": "^4.1.1", | ||
"fast-check": "^3.13.2", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"fast-check": "^3.15.0", | ||
"happy-dom": "^9.20.3", | ||
"matchers": "link:@testing-library/jest-dom/matchers", | ||
"rambda": "^8.5.0", | ||
"rambda": "^9.0.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"rimraf": "^5.0.5", | ||
"typescript": "^5.2.2", | ||
"vite": "4.4.9", | ||
"vitest": "^0.34.6", | ||
"@axelarjs/config": "0.0.0-snapshot.2897c97" | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.12", | ||
"vitest": "^1.2.1", | ||
"@axelarjs/config": "0.0.0-snapshot.2f6e7cb" | ||
}, | ||
@@ -80,0 +80,0 @@ "dependencies": { |
import type { AnyRecord, PluralizeKeys } from "./types"; | ||
export declare const caseInsensitiveRecord: <T>(record: Record<string, T>) => Record<string, T>; | ||
export declare function pluralizeKeys<T extends AnyRecord>(obj: T): PluralizeKeys<T>; | ||
export declare const invert: <T extends Record<string, string>>(obj: T) => { [K in keyof T as T[K]]: K; }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pluralizeKeys = exports.caseInsensitiveRecord = void 0; | ||
exports.invert = exports.pluralizeKeys = exports.caseInsensitiveRecord = void 0; | ||
const caseInsensitiveRecord = (record) => new Proxy(record, { | ||
@@ -25,1 +25,3 @@ get(target, p) { | ||
exports.pluralizeKeys = pluralizeKeys; | ||
const invert = (obj) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [v, k])); | ||
exports.invert = invert; |
124620
3041