2.0.6 • Published 1 year ago
@types/humps v2.0.6
Installation
npm install --save @types/humps
Summary
This package contains type definitions for humps (https://github.com/domchristie/humps).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/humps.
index.d.ts
// Type definitions for humps 2.0
// Project: https://github.com/domchristie/humps
// Definitions by: Niklas Mollenhauer <https://github.com/nikeee>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export function camelize(value: string): string;
export function pascalize(value: string): string;
export function decamelize(value: string, optionsOrProcessor?: OptionOrProcessor): string;
export function depascalize(value: string, optionsOrProcessor?: OptionOrProcessor): string;
export function camelizeKeys(str: object[], optionsOrProcessor?: OptionOrProcessor): object[];
export function camelizeKeys(str: object, optionsOrProcessor?: OptionOrProcessor): object;
export function pascalizeKeys(str: object[], optionsOrProcessor?: OptionOrProcessor): object[];
export function pascalizeKeys(str: object, optionsOrProcessor?: OptionOrProcessor): object;
export function decamelizeKeys(str: object[], optionsOrProcessor?: OptionOrProcessor): object[];
export function decamelizeKeys(str: object, optionsOrProcessor?: OptionOrProcessor): object;
export function depascalizeKeys(str: object[], optionsOrProcessor?: OptionOrProcessor): object[];
export function depascalizeKeys(str: object, optionsOrProcessor?: OptionOrProcessor): object;
export interface HumpsOptions {
separator?: string | undefined;
split?: RegExp | undefined;
process?: HumpsProcessor | undefined;
}
export interface HumpsProcessor {
(key: string, convert: HumpsProcessorParameter, options?: HumpsOptions): string;
}
export interface HumpsProcessorParameter {
(key: string, options?: HumpsOptions): string;
}
export type OptionOrProcessor = HumpsOptions | HumpsProcessor;
export as namespace humps;
Additional Details
- Last updated: Tue, 06 Jul 2021 21:33:37 GMT
- Dependencies: none
- Global values:
humps
Credits
These definitions were written by Niklas Mollenhauer, and Piotr Błażejewicz.