You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Alan Pope 83bed4a4ee Only build on supported architectures (#55)
As per comment in #53 - looks like nodejs isn't supported on [s390x]https://launchpadlibrarian.net/401523666/buildlog_snap_ubuntu_xenial_s390x_d862f303dc85a1886a1db80b5e691216-xenial_BUILDING.txt.gz) and [ppc64el](https://launchpadlibrarian.net/401523830/buildlog_snap_ubuntu_xenial_ppc64el_d862f303dc85a1886a1db80b5e691216-xenial_BUILDING.txt.gz). This change tells the build system to only build on the listed supported architectures.
6 years ago
snap Only build on supported architectures (#55) 6 years ago
.gitignore Add standalone binary dist 7 years ago
.travis.yml ci: test Node.js 8, 10 and 11 (#26) 6 years ago
LICENSE Create LICENSE 7 years ago
README.md Update README.md 6 years ago
config.js Make autocomplete configurable 6 years ago
docs.md Update docs.md 6 years ago
fx.js Fix autocomplete for keys starting with upper case 6 years ago
index.js Improve DX 6 years ago
package.json Release 9.0.2 6 years ago
print.js Improve JSON.stringify compatibility 6 years ago
reduce.js Add better detection of functions in reduce 6 years ago
test.js Add better detection of functions in reduce 6 years ago

README.md

fx

fx example

* Function eXecution

Build Status Npm Version Brew Version

Command-line JSON processing tool

Features

  • Formatting and highlighting
  • Standalone binary
  • Interactive mode 🎉
  • Themes support 🎨

Install

$ npm install -g fx

Or via Homebrew

$ brew install fx

Or download standalone binary from releases page.

Usage

Start interactive mode without passing any arguments.

$ curl ... | fx

Or by passing filename as first argument.

$ fx data.json

Pipe into fx any JSON and anonymous function for reducing it.

$ curl ... | fx 'json => json.message'

Or same as above but short.

$ curl ... | fx this.message
$ curl ... | fx .message

Pass any numbers of arguments as code.

$ curl ... | fx 'json => json.message' 'json => json.filter(x => x.startsWith("a"))' 

Access all lodash (or ramda, etc) methods by using .fxrc file.

$ curl ... | fx '_.groupBy("commit.committer.name")' '_.mapValues(_.size)'

Update JSON using spread operator.

$ echo '{"count": 0}' | fx '{...this, count: 1}'
{
  "count": 1
}

Pretty print JSON with dot.

$ curl ... | fx .

Documentation

See full documentation.

License

MIT