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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.31
0.0.20
0.0.10

Package Sidebar

Install

npm i jsol

Weekly Downloads

1

Version

0.0.3

License

none

Last publish

Collaborators

  • bat