1.2.0 • Published 6 months ago

jsoncalc v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Lines

jsoncalc

A utility to watch a json file and run calculations recursively.

Installation

npm install --global jsoncalc

npm.io

Usage

jsoncalc budget.json

jsoncalc -h

Usage: jsoncalc [options] <pathToJson>

Watches for changes and adds calculated elements to each hashmap in the json file at <pathToJson>

Options:
  -V, --version            output the version number
  -r, --reducer <reducer>  One or more (comma seperated) of the available reducer computations: [sum, count, avg, yep, nope]. (default: sum)
  -h, --help               display help for command

Handy Aliases

# Using the defined EDITOR environment variable, e.g. export EDITOR=nvim
alias jsonc='function _jsonc(){ (for i in $@; do :; done; jsoncalc $@ & $EDITOR $i) }; _jsonc'
# Autocompletion for zsh
compdef '_files -g "*.(json|yaml|yml)"' _jsonc
1.2.0

6 months ago

1.1.8

3 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago