time-to-botec

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

README.md (2380B)


      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 # isEmptyString
     22 
     23 > Test if a value is an empty string.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 ```javascript
     30 var isEmptyString = require( '@stdlib/assert/is-empty-string' );
     31 ```
     32 
     33 #### isEmptyString( value )
     34 
     35 Tests if a value is an empty `string`.
     36 
     37 <!-- eslint-disable no-new-wrappers -->
     38 
     39 ```javascript
     40 var bool = isEmptyString( '' );
     41 // returns true
     42 
     43 bool = isEmptyString( new String( '' ) );
     44 // returns true
     45 ```
     46 
     47 #### isEmptyString.isPrimitive( value )
     48 
     49 Tests if a `value` is an empty primitive `string`.
     50 
     51 <!-- eslint-disable no-new-wrappers -->
     52 
     53 ```javascript
     54 var bool = isEmptyString.isPrimitive( '' );
     55 // returns true
     56 
     57 bool = isEmptyString.isPrimitive( new String( '' ) );
     58 // returns false
     59 ```
     60 
     61 #### isEmptyString.isObject( value )
     62 
     63 Tests if a `value` is an empty `String` object.
     64 
     65 <!-- eslint-disable no-new-wrappers -->
     66 
     67 ```javascript
     68 var bool = isEmptyString.isObject( '' );
     69 // returns false
     70 
     71 bool = isEmptyString.isObject( new String( '' ) );
     72 // returns true
     73 ```
     74 
     75 </section>
     76 
     77 <!-- /.usage -->
     78 
     79 <section class="examples">
     80 
     81 ## Examples
     82 
     83 <!-- eslint-disable no-new-wrappers, no-restricted-syntax, no-empty-function -->
     84 
     85 <!-- eslint no-undef: "error" -->
     86 
     87 ```javascript
     88 var isEmptyString = require( '@stdlib/assert/is-empty-string' );
     89 
     90 var bool = isEmptyString( '' );
     91 // returns true
     92 
     93 bool = isEmptyString( new String( '' ) );
     94 // returns true
     95 
     96 bool = isEmptyString( 'beep' );
     97 // returns false
     98 
     99 bool = isEmptyString( 0 );
    100 // returns false
    101 
    102 bool = isEmptyString( null );
    103 // returns false
    104 
    105 bool = isEmptyString( void 0 );
    106 // returns false
    107 
    108 bool = isEmptyString( {} );
    109 // returns false
    110 
    111 bool = isEmptyString( [] );
    112 // returns false
    113 
    114 bool = isEmptyString( function empty() {} );
    115 // returns false
    116 ```
    117 
    118 </section>
    119 
    120 <!-- /.examples -->
    121 
    122 <section class="links">
    123 
    124 </section>
    125 
    126 <!-- /.links -->