utility-npm
v2.0.1
Published
Lightweight utility functions for string casing and object property checks.
Maintainers
Readme
utility-npm for converting title case, capital letters,
capitalize(str: string): string
Capitalize the first letter of a string.
capitalize('hello world'); // "Hello world"
### `hasProperty(Obj:any, property: string): boolean`
whether the property is present in the object
hasProperty({a: 1}, 'a'); // true
### `toTitleCase(str: string): string`
returns title-case string for a given string
toTitleCase('hello world') // "Hello World"
### `toSlugify(str: string): string`
return a slugify string
toSlugify('Hello World I am')//hello-world-I-am