@chan4lk/sortatoz

1.0.3 • Public • Published

Simple Sort function to sort arrays alphabetically with a nested property

Usage

import {sortatoz} from '@chan4lk/sortatoz';

const array = [{name:'ranaweera'},{name:'chandima'}];

const sorted = array.sort(sortatoz('name'));

console.log(sorted); // {name:'chandima'}, {name:'ranaweera'}

Readme

Keywords

none

Package Sidebar

Install

npm i @chan4lk/sortatoz

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

6.1 kB

Total Files

9

Last publish

Collaborators

  • chan4lk