diff --git a/lib/node_modules/@stdlib/assert/is-constantcase/README.md b/lib/node_modules/@stdlib/assert/is-constantcase/README.md new file mode 100644 index 000000000000..2425fe05409a --- /dev/null +++ b/lib/node_modules/@stdlib/assert/is-constantcase/README.md @@ -0,0 +1,191 @@ + + +# isConstantcase + +> Test if a value is a constantcase string. + +
+ +## Usage + +```javascript +var isConstantcase = require( '@stdlib/assert/is-constantcase' ); +``` + +#### isConstantcase( value ) + +Tests if a `value` is a constantcase `string`. + +```javascript +var bool = isConstantcase( 'BEEP_BOOP' ); +// returns true + +bool = isConstantcase( 'BEEP and BOOP' ); +// returns false +``` + +
+ + + +
+ +## Notes + +- The function validates that a `value` is a `string`. For all other types, the function returns `false`. + +
+ + + +
+ +## Examples + + + +```javascript +var isConstantcase = require( '@stdlib/assert/is-constantcase' ); + +var bool = isConstantcase( 'BEEP_BOOP' ) ); +// returns true + +bool = isConstantcase( 'BEEP and BOOP' ) ); +// returns false + +bool = isConstantcase( 'BEEP_BOOP_BEEP' ) ); +// returns true + +bool = isConstantcase( 'b' ) ); +// returns true + +bool = isConstantcase( 'B' ) ); +// returns true + +bool = isConstantcase( '!' ) ); +// returns false + +bool = isConstantcase( 'beep boop' ) ); +// returns false +``` + +
+ + + +* * * + +
+ +## CLI + +
+ +### Usage + +```text +Usage: is-constantcase [options] [] + +Options: + + -h, --help Print this message. + -V, --version Print the package version. + --split sep Delimiter for stdin data. Default: '/\\r?\\n/'. +``` + +
+ + + + + +
+ +### Notes + +- If the split separator is a [regular expression][mdn-regexp], ensure that the `split` option is either properly escaped or enclosed in quotes. + + ```bash + # Not escaped... + $ echo -n $'beEp booP\nFOO' | is-constantcase --split /\r?\n/ + # Escaped... + $ echo -n $'beEp booP\nFOO' | is-constantcase --split /\\r?\\n/ + ``` + +- The implementation ignores trailing delimiters. + +
+ + + +
+ +### Examples + +```bash +$ is-constantcase beepboop +true +``` + +To use as a [standard stream][standard-streams], + +```bash +$ echo -n 'beep Boop' | is-constantcase +false +``` + +By default, when used as a [standard stream][standard-streams], the implementation assumes newline-delimited data. To specify an alternative delimiter, set the `split` option. + +```bash +$ echo -n 'beepBoop\tBEEP_BOOP' | is-constantcase --split '\t' +false +true +``` + +
+ + + +
+ + + + + +