An open API service indexing awesome lists of open source software.

https://github.com/ksxnodeapps/require-to-json

Require a JavaScript file and print JSON result to stdout
https://github.com/ksxnodeapps/require-to-json

cli eval javascript json nodejs npm

Last synced: 4 months ago
JSON representation

Require a JavaScript file and print JSON result to stdout

Awesome Lists containing this project

README

          

# require-to-json
Require a JavaScript file and print JSON result to stdout

## Installation

```bash
npm install --global require-to-json
```

## Command-line usage

```bash
require-to-json file.js
```

```bash
require-to-json < file.js
```

```bash
cat file.js | require-to-json
```

```bash
echo 'module.exports = 123 + 456' | require-to-json
```