Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Where do you see npm/npx mentioned?


The project supports JS scripts as arguments to process the data:

https://fx.wtf/getting-started#json-processing

It's hard to tell from the docs if there is any JS involved if you just pipe JSON data to fx. I would hope not, since it mentions being written in Go for performance.


This is what I was wondering as well. Is there an interpreter built into the go binary? or is it using my node install under the hood?

Edit: Answered my own question. I installed it into a podman container with nothing else in it, and it printed this when trying to execute js:

    Node.js or Deno is required to run fx with reducers.


strace (on Linux) would have told you that without needing to user podman


at https://fx.wtf/getting-started it says:

$ cat file.json | npx fx .field


It seems it would work since they release an npm package too: https://www.npmjs.com/package/fx

A bit surprising, I wonder if they implemented it in JS too, or somehow managed to distribute their Go program on npm.

Edit: They indeed have a separate non-interactive version in JS: https://github.com/antonmedv/fx/tree/master/npm




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: