README.md (2245B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # isLowercase 22 23 > Test if a value is a lowercase string. 24 25 <section class="usage"> 26 27 ## Usage 28 29 ```javascript 30 var isLowercase = require( '@stdlib/assert/is-lowercase' ); 31 ``` 32 33 #### isLowercase( value ) 34 35 Tests if a `value` is a lowercase `string`. 36 37 ```javascript 38 var bool = isLowercase( 'salt and light' ); 39 // returns true 40 41 bool = isLowercase( 'HELLO' ); 42 // returns false 43 44 bool = isLowercase( 'World' ); 45 // returns false 46 ``` 47 48 </section> 49 50 <!-- /.usage --> 51 52 <section class="notes"> 53 54 ## Notes 55 56 - This function validates that a `value` is a `string`. For all other types, the function returns `false`. 57 58 </section> 59 60 <!-- /.notes --> 61 62 <section class="examples"> 63 64 ## Examples 65 66 <!-- eslint no-undef: "error" --> 67 68 ```javascript 69 var isLowercase = require( '@stdlib/assert/is-lowercase' ); 70 71 var bool = isLowercase( 'hello' ); 72 // returns true 73 74 bool = isLowercase( '' ); 75 // returns false 76 77 bool = isLowercase( 'Hello' ); 78 // returns false 79 80 bool = isLowercase( 'HELLO' ); 81 // returns false 82 ``` 83 84 </section> 85 86 <!-- /.examples --> 87 88 * * * 89 90 <section class="cli"> 91 92 ## CLI 93 94 <section class="usage"> 95 96 ### Usage 97 98 ```text 99 Usage: is-lowercase [options] [<string>] 100 101 Options: 102 103 -h, --help Print this message. 104 -V, --version Print the package version. 105 ``` 106 107 </section> 108 109 <!-- /.usage --> 110 111 <section class="examples"> 112 113 ### Examples 114 115 ```bash 116 $ is-lowercase BEEP 117 false 118 ``` 119 120 To use as a [standard stream][standard-streams], 121 122 ```bash 123 $ echo -n 'boop' | is-lowercase 124 true 125 ``` 126 127 </section> 128 129 <!-- /.examples --> 130 131 </section> 132 133 <!-- /.cli --> 134 135 <section class="links"> 136 137 [standard-streams]: https://en.wikipedia.org/wiki/Standard_streams 138 139 </section> 140 141 <!-- /.links -->