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

https://github.com/coreh/js

A better `node -p`
https://github.com/coreh/js

Last synced: 11 months ago
JSON representation

A better `node -p`

Awesome Lists containing this project

README

          

# js

**js** is a a better alternative to `node -p`. It will automatically convert data from and to JSON string representations, and will automatically expose enviroment variables as globals preceded with `$`.

## Usage

```bash
js
```

## Examples

Using math

```bash
js 2+2
```

Read a field from a JSON file

```bash
js stdin.version < package.json
```

Add a field to a JSON file on the fly

```bash
js 'stdin.foo = "bar", stdin' < in.json > out.json
```