0.1.7 • Published 6 years ago

@reaktivo/rq v0.1.7

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

rq

GitHub license npm version Coverage Status CircleCI Status PRs Welcome

rq is a jq inspired command-line swiss-army tool

Installation

npm install -g @reaktivo/rq

Usage

rq 'fetch`https://httpbin.org/ip`.then(res => res.json()).then(res => res.origin)'
77.173.111.54

# Since we also expose lodash/fp, the previous command is equivalent to the following
rq 'fetchJson `https://httpbin.org/ip`, get `origin`, split `.`'
77.173.111.54

rq 'fetchJson `https://httpbin.org/ip`' 'get `origin`' 'split `.`'

Out of the box, rq allows you to safely evaluate javascript with the following globals exposed:

  • fetch: A browser compatible fetch implementation
  • fetchJson, fetchBody: Shortcuts for the fetch function
  • lodash/fp methods
  • Rxjs Operators: map, filter, switchMap, etc

Development

Testing is done via the tap and is intended to be simple and straight to the point.

npm test

Acknowledgements

I'm thankful to the authors of the following related projects which server as inspiration to rq:

License

rq is open source software licensed as MIT.