Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

by-key

1.0.0 • Public • Published

by-key

var byKey = require('by-key');
var people = [
    { name:'Peter', age:23 },
    { name:'Taylor', age:18 },
    { name:'Emma', age:29 }
];
 
 
people.sort(byKey('age'));

Keywords

none

install

npm i by-key

Downloadsweekly downloads

1,068

version

1.0.0

license

MIT

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar