dotcase
Convert a string to dot case.
Usage
var dotcase = require( '@stdlib/string/base/dotcase' );
dotcase( str )
Converts a string to dot case.
var str = dotcase( 'foo bar' );
// returns 'foo.bar'
str = dotcase( 'foo bar baz' );
// returns 'foo.bar.baz'
str = dotcase( 'foo_bar' );
// returns 'foo.bar'
Examples
var dotcase = require( '@stdlib/string/base/dotcase' );
var str = 'Hello World!';
var out = dotcase( str );
// returns 'hello.world'
str = 'I am a tiny little teapot';
out = dotcase( str );
// returns 'i.am.a.tiny.little.teapot'
str = 'with big problems';
out = dotcase( str );
// returns 'with.big.problems'
str = 'To be, or not to be: that is the question.';
out = dotcase( str );
// returns 'to.be.or.not.to.be.that.is.the.question'
str = 'isMobile';
out = dotcase( str );
// returns 'is.mobile'