npm package: @geut/brode
Description: A polyfill Node.js browser platform
Author: GEUT
Latest version: 2.0.16

# brode
A polyfill Node.js browser platform

![Test Status](https://github.com/geut/brode/actions/workflows/test.yml/badge.svg)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

[![Made by GEUT][geut-badge]][geut-url]

## Install

```bash
$ npm install -g @geut/brode
```

## Usage

```bash
$ brode index.js
```

### Test using uvu

`brode` provides built-in support for `uvu` and `tap` like test runners.

```javascript
// test.js
import { test } from 'uvu';
import * as assert from 'uvu/assert';

test('Math.sqrt()', () => {
  assert.is(Math.sqrt(4), 2);
  assert.is(Math.sqrt(144), 12);
  assert.is(Math.sqrt(2), Math.SQRT2);
});

test('JSON', () => {
  const input = {
    foo: 'hello',
    bar: 'world'
  };

  const output = JSON.stringify(input);

  assert.snapshot(output, `{"foo":"hello","bar":"world"}`);
  assert.equal(JSON.parse(output), input, 'matches original');
});

test.run();
```

```bash
$ brode test.js -p uvu --target chromium,firefox
• •   (2 / 2)

  Total:     2
  Passed:    2
  Skipped:   0
  Duration:  3.00ms
  Target:    chromium

• •   (2 / 2)

  Total:     2
  Passed:    2
  Skipped:   0
  Duration:  6.00ms
  Target:    firefox
```

### Node.js Stream support

You can use Node.js streams in the browser:

```javascript
// reader.js
process.stdin.on('data', data => {
  console.log(data.toString())
})
```

```bash
$ echo 'hello' | brode reader.js
hello
```

## Issues

:bug: If you found an issue we encourage you to report it on [github](https://github.com/geut/brode/issues). Please specify your OS and the actions to reproduce it.

## Contributing

:busts_in_silhouette: Ideas and contributions to the project are welcome. You must follow this [guideline](https://github.com/geut/brode/blob/main/CONTRIBUTING.md).

## License

MIT © A [**GEUT**](http://geutstudio.com/) project

[geut-url]: https://geutstudio.com
[geut-badge]: https://img.shields.io/badge/Made%20By-GEUT-4f5186?style=for-the-badge&link=https://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