naming-convention-types
v1.0.0
Published
Validate naming convention of string type.
Downloads
2
Readme
naming-convention-types
Validate naming convention of string type.
import {
ValidateUpperSnakeCase,
ValidateCamelCase
} from 'naming-convention-type'
ValidateUpperSnakeCase<'Foo'> // never
ValidateUpperSnakeCase<'FOO_BAR'> // 'FOO_BAR'
ValidateCamelCase<'Foo'> // never
ValidateCamelCase<'foo_bar'> // never
ValidateCamelCase<'fooBar'> // 'fooBar'