<commit_before># Standard Input

> [Standard input][standard-streams].

<section class="usage">

## Usage

```javascript
var stdin = require( '@stdlib/streams/base/stdin' );
```

#### stdin

[Standard input][standard-streams] as a [Readable stream][readable-stream].

```javascript
var data = [];
var len = 0;

stdin.on( 'readable', onReadable );
stdin.on( 'error', onError );
stdin.on( 'end', onEnd );

function onReadable() {
    var chunk;
    while ( true ) {
        chunk = stdin.read();
        if ( chunk === null ) {
            break;
        }
        data.push( chunk );
        len += chunk.length;
    }<commit_msg>Disabling running code block<commit_after># Standard Input

> [Standard input][standard-streams].

<section class="usage">

## Usage

```javascript
var stdin = require( '@stdlib/streams/base/stdin' );
```

#### stdin

[Standard input][standard-streams] as a [Readable stream][readable-stream].

<!-- run-disable -->

```javascript
var data = [];
var len = 0;

stdin.on( 'readable', onReadable );
stdin.on( 'error', onError );
stdin.on( 'end', onEnd );

function onReadable() {
    var chunk;
    while ( true ) {
        chunk = stdin.read();
        if ( chunk === null ) {
            break;
        }
        data.push( chunk );
        len += chunk.length;
    }
{'fraction_non_alphanumeric': 0.17297297297297298, 'fraction_numerical': 0.0015444015444015444, 'mean_word_length': 2.8456973293768546, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5007577', 'n_tokens_mistral': 436, 'n_tokens_neox': 418, 'n_words': 106}