Skip to content

Commit

Permalink
Document Ramda support
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstjules committed Mar 1, 2017
1 parent b7ade6a commit bb7f1b9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool supports json output.
```

pjs also includes lodash functions, which can be accessed via the `_` object,
and chained using $$.
and chained using $$

``` bash
echo 'hello' | pjs -m '_.upperFirst($)'
Expand All @@ -59,6 +59,14 @@ pjs -m '$$.lowerCase().split(" ").map(_.upperFirst).join(" ")'
# Please Titleize This Sentence
```

as well as Ramda and point-free style

``` bash
echo 'please-titleize-this-sentence' | \
pjs -m "R.compose(R.replace(/(^|\s)\w/g, R.toUpper), R.replace(/-/g, ' '))"
# Please Titleize This Sentence
```

## Installation

It can be installed via `npm` using:
Expand All @@ -78,6 +86,8 @@ filter, map, reduce
All functions are passed the line ($) and index (i)
Built-in reduce functions: length, min, max, sum, avg, concat
Custom reduce expressions accept: prev, curr, i, array
Includes lodash (_), and can be chained using $$
Supports Ramda (R) and point-free style
Options:
Expand Down
4 changes: 3 additions & 1 deletion bin/pjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ var summ = " Functions and expressions are invoked in the following order:\n" +
" filter, map, reduce\n\n" +
" All functions are passed the line ($) and index (i)\n" +
" Built-in reduce functions: length, min, max, sum, avg, concat\n" +
" Custom reduce expressions accept: prev, curr, i, array";
" Custom reduce expressions accept: prev, curr, i, array\n" +
" Includes lodash (_), and can be chained using $$\n"+
" Supports Ramda (R) and point-free style"

program
.version(require('../package.json').version)
Expand Down

0 comments on commit bb7f1b9

Please sign in to comment.