capitalized
v1.0.0
Published
Returns true if a string’s first letter is uppercase.
Downloads
6
Maintainers
Readme
capitalized
Returns true if a string’s first letter is uppercase.
Installation
To install using Node.js:
npm i capitalized
API
The module exports a single function.
Parameter
str
(string)
Return Values
true
ifstr
is capitalizedfalse
otherwise
Example
const capitalized = require('capitalized')
capitalized('not capitalized') // false
capitalized('Capitalized') // true
capitalized('UPPERCASE') // true