0.5.2 • Published 6 years ago
fx-jsy v0.5.2
fx-jsy: fx with JSY syntax dialect
Combining the excellent fx utility from Anton Medvedev with JSY syntax dialect.
Documentation
See the fx documentation – all the hard work was done by Anton Medvedev anyway!
Use
$ npm install -g fx-jsy$ echo '[3, 4, 5]' | npx fx-jsy '.map @ x => x ** x'
[
  27,
  256,
  3125
]$ fx-jsy .dependencies .fx < package.json
^3.0.3A more complex example converting JSON to CSV:
$ curl https://jsonplaceholder.typicode.com/posts | fx-jsy \
    '[ Object.keys(this[0]) ].concat @ this.map @ ea => Object.values(ea)' \
    '.map @ ea => ea.map @ val => JSON.stringify(val)' \
    '.map @ ea => ea.join @ `,`' \
    '.join @ `\n`' \
    > test.csvLicense
MIT