time-to-botec/js/node_modules/@stdlib/assert/is-capitalized
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00
..
bin feat: add the node modules 2022-12-03 12:44:49 +00:00
docs feat: add the node modules 2022-12-03 12:44:49 +00:00
etc feat: add the node modules 2022-12-03 12:44:49 +00:00
lib feat: add the node modules 2022-12-03 12:44:49 +00:00
package.json feat: add the node modules 2022-12-03 12:44:49 +00:00
README.md feat: add the node modules 2022-12-03 12:44:49 +00:00

isCapitalized

Test if a value is a string having an uppercase first character.

Usage

var isCapitalized = require( '@stdlib/assert/is-capitalized' );

isCapitalized( value )

Tests if a value is a string having an uppercase first character.

var bool = isCapitalized( 'Every noble work is at first impossible.' );
// returns true

bool = isCapitalized( 'HELLO WORLD!' );
// returns true

bool = isCapitalized( 'salt and light' );
// returns false

Notes

  • The function validates that a value is a string. For all other types, the function returns false.

Examples

var isCapitalized = require( '@stdlib/assert/is-capitalized' );

var bool = isCapitalized( 'Hello' );
// returns true

bool = isCapitalized( 'HELLO' );
// returns true

bool = isCapitalized( '' );
// returns false

bool = isCapitalized( 'hello' );
// returns false

CLI

Usage

Usage: is-capitalized [options] [<string>]

Options:

  -h,    --help                Print this message.
  -V,    --version             Print the package version.

Examples

$ is-capitalized Beep
true

To use as a standard stream,

$ echo -n 'boop' | is-capitalized
false