Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/bolasblack/ramda-cli

Process stdin with [ramda](http://ramdajs.com/)
https://github.com/bolasblack/ramda-cli

Last synced: 11 days ago
JSON representation

Process stdin with [ramda](http://ramdajs.com/)

Awesome Lists containing this project

README

        

# ramda-cli

Usage:

ramda [-h] [-p]

Options:

-h, --help output this message
-p, --plain use `#toString` instead of `JSON.stringify` to print result

Examples:

echo '[{"a":1, "b": 2}, {"b": 3}]' | ramda "map(compose(num => String(num), prop('b')))"
# => ["2","3"]

echo '[{"a":1, "b": 2}, {"b": 3}]' | ramda "map(compose(num => String(num), prop('b')))(data).join(' ')" -p
# => 2 3

echo '[{"a":1, "b": 2}, {"b": 3}]' | ramda "data.reduce((memo, elem) => memo + elem.b, 0)"
# => 5