# requireasync

> async require for the browser, also works in node

Latest version **0.0.19** (published 2014-07-05) · 0 weekly downloads

## Install

```sh
npm install requireasync
pnpm add requireasync
yarn add requireasync
bun add requireasync
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.19 |
| Published | 2014-07-05 |
| First published | 2014-06-30 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jonathan Annett |
| Maintainers | sophtwhere |

## Links

- npm: https://www.npmjs.com/package/requireasync
- Repository: https://github.com/sophtwhere/requireasync
- npm.io page: https://npm.io/package/requireasync

## Dependencies (1)

- [eachkv](https://npm.io/package/eachkv.md) >=1.0.7

## Recent versions

- 0.0.19 (latest) — 2014-07-05
- 0.0.18 — 2014-07-04
- 0.0.17 — 2014-07-03
- 0.0.16 — 2014-07-03
- 0.0.15 — 2014-07-03
- 0.0.14 — 2014-07-03
- 0.0.13 — 2014-07-03
- 0.0.12 — 2014-07-01
- 0.0.11 — 2014-07-01
- 0.0.10 — 2014-07-01
- 0.0.9 — 2014-07-01
- 0.0.8 — 2014-07-01
- 0.0.7 — 2014-07-01
- 0.0.6 — 2014-07-01
- 0.0.5 — 2014-07-01
- … 4 more at https://npm.io/package/requireasync/versions

## README

**requireasync**

usage


    if(!window)var window=eval(require('requireasync').install);else var node=false,browser=true;

        REQUIRE(
            ["fs", "path.resolve"],
        function (err, fs, resolve) {

			    fs.readFile(resolve(".","readme,md"),function(err,data){
				
				    console.log(err,data);
				
			    })
		    }
	    )



Shorthand: $R$ can be substituted for REQUIRE

Try this for an instant load and run one liner:

    console.log($R$({path:"resolve"})(".","myfile.js"));


See the html folder for a working demo.

change to that folder and type

    $ npm install .
    $ node demo.js

To load the demo server, and it will give you a local browser url along the lines of

    visit http://localhost:8080/index.html to demo the browser files

---
_Source: https://npm.io/package/requireasync · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
