Skip to content

@technobuddha > library > Programming > Variables

Function: dotCase()

ts
function dotCase(input: string): string;

Defined in: dot-case.ts:18

Convert an identifier string to a dot form

Parameters

ParameterTypeDescription
inputstringThe identifier string

Returns

string

the identifier in dot form

Example

typescript
dotCase('hello world'); // 'hello.world'
dotCase('HelloWorld'); // 'hello.world'
dotCase('foo_bar-baz'); // 'foo.bar.baz'
dotCase('FOO BAR'); // 'foo.bar'