true-sort
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

true-sort   npm

Truly sort anything, and with zero dependencies 🚀

Installing

Via npm:

$ npm install [--save-dev] true-sort

Via yarn:

$ yarn add [--dev] true-sort

Usage

import { trueSort } from "true-sort";
// or
import trueSort from "true-sort";

const unsortedData = ...;
const options = { preferedSortKeys: "id" };
const sortedData = trueSort(unsortedData, options);

CLI

true-sort can be used on JSON files trough the CLI.

$ node node_modules/true-sort/dist/cli.js path/to/json [options]

Options

Option Type Description
preferedSortKeys string | string[] One or prioritized list of keys to sort object keys upon.

Package Sidebar

Install

npm i true-sort

Weekly Downloads

1

Version

0.0.12

License

MIT

Unpacked Size

32.5 kB

Total Files

42

Last publish

Collaborators

  • fredrikkadolfsson