diff --git a/README.md b/README.md index 17672ef..867a8fc 100644 --- a/README.md +++ b/README.md @@ -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($)' @@ -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: @@ -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: diff --git a/bin/pjs b/bin/pjs index d12e4f7..b097d28 100755 --- a/bin/pjs +++ b/bin/pjs @@ -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)