time-to-botec

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

README.md (2192B)


      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 # SharedArrayBuffer Support
     22 
     23 > Detect native [`SharedArrayBuffer`][mdn-sharedarraybuffer] support.
     24 
     25 <section class="usage">
     26 
     27 ## Usage
     28 
     29 <!-- eslint-disable id-length -->
     30 
     31 ```javascript
     32 var hasSharedArrayBufferSupport = require( '@stdlib/assert/has-sharedarraybuffer-support' );
     33 ```
     34 
     35 #### hasSharedArrayBufferSupport()
     36 
     37 Detects if a runtime environment supports [`SharedArrayBuffer`][mdn-sharedarraybuffer].
     38 
     39 ```javascript
     40 var bool = hasSharedArrayBufferSupport();
     41 // returns <boolean>
     42 ```
     43 
     44 </section>
     45 
     46 <!-- /.usage -->
     47 
     48 <section class="examples">
     49 
     50 ## Examples
     51 
     52 <!-- eslint-disable id-length -->
     53 
     54 <!-- eslint no-undef: "error" -->
     55 
     56 ```javascript
     57 var hasSharedArrayBufferSupport = require( '@stdlib/assert/has-sharedarraybuffer-support' );
     58 
     59 var bool = hasSharedArrayBufferSupport();
     60 if ( bool ) {
     61     console.log( 'Environment has SharedArrayBuffer support.' );
     62 } else {
     63     console.log( 'Environment lacks SharedArrayBuffer support.' );
     64 }
     65 ```
     66 
     67 </section>
     68 
     69 <!-- /.examples -->
     70 
     71 * * *
     72 
     73 <section class="cli">
     74 
     75 ## CLI
     76 
     77 <section class="usage">
     78 
     79 ### Usage
     80 
     81 ```text
     82 Usage: has-sharedarraybuffer-support [options]
     83 
     84 Options:
     85 
     86   -h,    --help                Print this message.
     87   -V,    --version             Print the package version.
     88 ```
     89 
     90 </section>
     91 
     92 <!-- /.usage -->
     93 
     94 <section class="examples">
     95 
     96 ### Examples
     97 
     98 ```bash
     99 $ has-sharedarraybuffer-support
    100 <boolean>
    101 ```
    102 
    103 </section>
    104 
    105 <!-- /.examples -->
    106 
    107 </section>
    108 
    109 <!-- /.cli -->
    110 
    111 <section class="links">
    112 
    113 [mdn-sharedarraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
    114 
    115 </section>
    116 
    117 <!-- /.links -->