jsol

0.0.3 • Public • Published

jsol

Installing

npm install -g jsol

Usage

jsol parses JSON input and pretty prints JSON output:

$ cat package.json | jsol 'pkg => pkg.bin'
{
  "jsol": "bin/jsol.js"
}

lodash is available as _:

$ cat package.json | jsol "pkg => _.pick(pkg, 'name', 'description')"
{
  "name": "jsol",
  "description": "utility for JavaScript one-liners"
}

An input format can be passed with --fmt. The default is json. The input can be read in as a string with str.

$ cat package.json | jsol --fmt str 'str => str.length'
244

TODO:

  • Support reading lines of text
  • Support callbacks
  • Support returning a promise

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i jsol

Weekly Downloads

7

Version

0.0.3

License

none

Last publish

Collaborators

  • bat