forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inflected.d.ts
44 lines (38 loc) · 1.36 KB
/
inflected.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Type definitions for inflected 1.1.6
// Project: https://github.com/martinandert/inflected
// Definitions by: Daniel Schmidt <https://github.com/dsci>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "inflected" {
namespace Options {
interface Humanize {
capitalize: boolean;
}
interface Transliterate {
locale: string;
replacement: string;
}
interface Parameterize {
separator: string;
}
}
interface Inflected {
pluralize(word: string, locale?: string): string;
singularize(word: string, locale?: string): string;
camelize(term: string, uppercaseFirstLetter?: boolean): string;
underscore(camelCaseWord: string): string;
humanize(lowerCaseAndUnderscoredWord: string,
options?: Options.Humanize): string;
titleize(sentence: string): string;
tableize(className: string): string;
classify(tableName: string): string;
dasherize(underscoredWord: string): string;
foreignKey(className: string,
separateClassNameAndIdWithUnderscore?:boolean): string;
ordinal(number: number): string;
ordinalize(number: number): string;
transliterate(sentence: string, options?: Options.Transliterate): string;
parameterize(sentence: string, options?: Options.Parameterize): string;
}
var Inflector:Inflected;
export = Inflector;
}