@kikobeats/jsonsort
Sort an object or a collection of objects based on a criteria.
Last updated 5 months ago by kikobeats .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kikobeats/jsonsort -g
SYNC missed versions from official npm registry.

@kikobeats/jsonsort

Last version Build Status NPM Status

Sort an object or a collection of objects based on a criteria.

Install

$ npm install @kikobeats/jsonsort --global

CLI

$ jsonsort <file>[flags]

Flags
  --criteria  Specify the criteria to sort. It can be a key name or fat arrow function.
  --quiet     Avoid print output
  --save      Write the output back. If a path is specified, it will be used over the original

Examples
  $ jsonsort file.json # Just output a sorted json
  $ jsonsort file.json --criteria name # Sort an array of objects based on alphabetical `name` value.
  $ jsonsort file.json --criteria 'x => x.featured' # Passing a function as criteria.
  $ jsonsort file.json --criteria name --save # Sort and save the result.
  $ jsonsort file.json --criteria name --save # Sort, save but dont print result.

License

jsonsort © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.

kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats

Current Tags

  • 1.3.2                                ...           latest (5 months ago)

10 Versions

  • 1.3.2                                ...           5 months ago
  • 1.3.1                                ...           5 months ago
  • 1.3.0                                ...           5 months ago
  • 1.2.0                                ...           6 months ago
  • 1.1.2                                ...           6 months ago
  • 1.1.1                                ...           9 months ago
  • 1.1.0                                ...           9 months ago
  • 1.0.2                                ...           9 months ago
  • 1.0.1                                ...           9 months ago
  • 1.0.0                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |