Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

jsy-lang/node-fx-jsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fx-jsy: fx with JSY syntax dialect

Combining the excellent fx utility from Anton Medvedev with JSY syntax dialect.

Documentation

See the fx documentationall 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.3

A 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.csv

License

MIT

About

Combine the excelent `fx` utility with JSY syntax

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published