1.0.1 • Published 1 year ago

turkish-sorter v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Installation

Using npm:

$ npm i turkish-sorter

Initialize

// import
import TurkishSorter from "turkish-sorter";

Usage

const sampleData = [
  { _id: 4, name: "i", surname: "j", city: "k" },
  { _id: 2, name: "d", surname: "e", city: "f" },
  { _id: 1, name: "a", surname: "b", city: "c" },
];

const sortedByName = TurkishSorter(sampleData, "name");
const sortedById = TurkishSorter(sampleData, "_id_");
const sortedBySurname = TurkishSorter(sampleData, "surname");