1.0.3 • Published 6 years ago
@chan4lk/sortatoz v1.0.3
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'}