Node.js-fx命令行JSON处理工具

  • v6_281220
    了解作者
  • 16.8KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-17 11:00
    上传日期
fx:命令行JSON处理工具
Node.js-fx命令行JSON处理工具.zip
  • antonmedv-fx-7bb8dcf
  • find.js
    647B
  • fx.js
    14.8KB
  • config.js
    1.1KB
  • reduce.js
    679B
  • Dockerfile
    64B
  • print.js
    3.1KB
  • DOCS.md
    6.8KB
  • test.js
    1.7KB
  • .travis.yml
    55B
  • bang.js
    2.7KB
  • LICENSE
    1KB
  • README.md
    2.9KB
  • stream.js
    1.5KB
  • .gitignore
    40B
  • index.js
    2.4KB
  • package.json
    1.6KB
内容介绍
<p align="center"><a href="http://fx.wtf" rel='nofollow' onclick='return false;'><img src="https://medv.io/assets/fx-logo.png" height="100" alt="fx logo"></a></p> <p align="center"><img src="https://medv.io/assets/fx.gif" width="562" alt="fx example"></p> _* Function eXecution_ [![Build Status](https://travis-ci.org/antonmedv/fx.svg?branch=master)](https://travis-ci.org/antonmedv/fx) [![Npm Version](https://img.shields.io/npm/v/fx.svg)](https://www.npmjs.com/package/fx) [![Brew Version](https://img.shields.io/homebrew/v/fx.svg)](https://formulae.brew.sh/formula/fx) Command-line JSON processing tool ## Features * Easy to use * Standalone binary * Interactive mode 🎉 * Themes support 🎨 * Streaming support 🌊 * Bash completion ## Install ``` $ npm install -g fx ``` Or via Homebrew ``` $ brew install fx ``` Or download standalone binary from [releases](https://github.com/antonmedv/fx/releases) page. Did you like **fx**? [Buy me a beer 🍺](https://paypal.me/antonmedv) or [send come ₿](https://www.wispay.io/t/ZQb) ## Usage Start [interactive mode](https://github.com/antonmedv/fx/blob/master/DOCS.md#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. ```bash $ curl ... | fx 'json => json.message' ``` Or same as above but short. ```bash $ curl ... | fx this.message $ curl ... | fx .message ``` Pass any numbers of arguments as code. ```bash $ curl ... | fx 'json => json.message' 'json => json.filter(x => x.startsWith("a"))' ``` Access all lodash (or ramda, etc) methods by using [.fxrc](https://github.com/antonmedv/fx/blob/master/DOCS.md#using-fxrc) file. ```bash $ curl ... | fx '_.groupBy("commit.committer.name")' '_.mapValues(_.size)' ``` Update JSON using spread operator. ```bash $ echo '{"count": 0}' | fx '{...this, count: 1}' { "count": 1 } ``` Pretty print JSON with dot. ```bash $ curl ... | fx . ``` Stream JSON into fx. ```bash $ kubectl logs ... -f | fx .message ``` Apply fx to a few JSON files. ```bash $ cat *.json | fx .length 3 4 ``` And try this: ```bash $ fx --life ``` ## Documentation See full [documentation](https://github.com/antonmedv/fx/blob/master/DOCS.md). ## Links * [Discover how to use fx effectively](https://medium.com/@antonmedv/discover-how-to-use-fx-effectively-668845d2a4ea) ## Related * [gofx](https://github.com/antonmedv/gofx) – fx-like JSON tool (*go*) * [eat](https://github.com/antonmedv/eat) – converts anything into JSON * [ymlx](https://github.com/matthewadams/ymlx) – fx-like YAML cli processor * [fx-completion](https://github.com/antonmedv/fx-completion) – bash completion for fx * [fx-theme-monokai](https://github.com/antonmedv/fx-theme-monokai) – monokai theme * [fx-theme-night](https://github.com/antonmedv/fx-theme-night) – night theme ## License [MIT](https://github.com/antonmedv/fx/blob/master/LICENSE)
评论
    相关推荐