Skip to content

Instantly share code, notes, and snippets.

@Anna-Myzukina
Last active August 26, 2018 11:55
Show Gist options
  • Save Anna-Myzukina/f1e2c5d248bd8a09b6422c39f49963e6 to your computer and use it in GitHub Desktop.
Save Anna-Myzukina/f1e2c5d248bd8a09b6422c39f49963e6 to your computer and use it in GitHub Desktop.
lololodash
var _ = require("lodash");
var worker = function(users) {
return _.where(users, {active: true});
};
module.exports = worker;
'use strict';
var_ = require("lodash");
var sorting = function(collection) {
return _.sortBy(collection, function(item) {
return -item.quantity;
});
}
module.exports = sorting;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment