time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (2197B)


      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 # isUppercase
     22 
     23 > Test if a value is an uppercase string.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var isUppercase = require( '@stdlib/assert/is-uppercase' );
     31 ```
     32 
     33 #### isUppercase( value )
     34 
     35 Tests if a `value` is an uppercase `string`.
     36 
     37 ```javascript
     38 var bool = isUppercase( 'HELLO' );
     39 // returns true
     40 
     41 bool = isUppercase( 'salt and light' );
     42 // returns false
     43 ```
     44 
     45 </section>
     46 
     47 <!-- /.usage -->
     48 
     49 <section class="notes">
     50 
     51 ## Notes
     52 
     53 -   The function validates that a `value` is a `string`. For all other types, the function returns `false`.
     54 
     55 </section>
     56 
     57 <!-- /.notes -->
     58 
     59 <section class="examples">
     60 
     61 ## Examples
     62 
     63 <!-- eslint no-undef: "error" -->
     64 
     65 ```javascript
     66 var isUppercase = require( '@stdlib/assert/is-uppercase' );
     67 
     68 var bool = isUppercase( 'HELLO' );
     69 // returns true
     70 
     71 bool = isUppercase( '' );
     72 // returns false
     73 
     74 bool = isUppercase( 'Hello' );
     75 // returns false
     76 
     77 bool = isUppercase( 'hello' );
     78 // returns false
     79 ```
     80 
     81 </section>
     82 
     83 <!-- /.examples -->
     84 
     85 * * *
     86 
     87 <section class="cli">
     88 
     89 ## CLI
     90 
     91 <section class="usage">
     92 
     93 ### Usage
     94 
     95 ```text
     96 Usage: is-uppercase [options] [<string>]
     97 
     98 Options:
     99 
    100   -h,    --help                Print this message.
    101   -V,    --version             Print the package version.
    102 ```
    103 
    104 </section>
    105 
    106 <!-- /.usage -->
    107 
    108 <section class="examples">
    109 
    110 ### Examples
    111 
    112 ```bash
    113 $ is-uppercase BEEP
    114 true
    115 ```
    116 
    117 To use as a [standard stream][standard-streams],
    118 
    119 ```bash
    120 $ echo -n 'boop' | is-uppercase
    121 false
    122 ```
    123 
    124 </section>
    125 
    126 <!-- /.examples -->
    127 
    128 </section>
    129 
    130 <!-- /.cli -->
    131 
    132 <section class="links">
    133 
    134 [standard-streams]: https://en.wikipedia.org/wiki/Standard_streams
    135 
    136 </section>
    137 
    138 <!-- /.links -->