분류 Nodejs

pjs - Pipeable JavaScript. 터미널에서 신속하게 필터링, 매핑 및 축소 할 수 있습니다.

컨텐츠 정보

  • 조회 246 (작성일 )

본문

https://github.com/danielstjules/pjs



Usage: pjs [options] [files ...]

Functions and expressions are invoked in the following order:
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:

  -h, --help               output usage information
  -V, --version            output the version number
  -i, --ignore             ignore empty lines
  -j, --json               output as json
  -f, --filter <exp>       filter by a boolean expression
  -m, --map <exp>          map values using the expression
  -r, --reduce <func|exp>  reduce using a function or expression
pjs