Skip to content

Commit

Permalink
deploy new version to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
cigolpl committed Dec 19, 2018
1 parent de21f18 commit f9b4b07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions dist/itemsjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2452,8 +2452,12 @@ module.exports.aggregation = function (items, input, aggregations) {


module.exports.sorted_items = function (items, sort, sortings) {
if (sortings[sort] && sortings[sort].field) {
return _.orderBy(items, [sortings[sort].field], [sortings[sort].order || 'asc']);
if (sortings && sortings[sort]) {
sort = sortings[sort];
}

if (sort.field) {
return _.orderBy(items, sort.field, sort.order || 'asc');
}

return items;
Expand Down
2 changes: 1 addition & 1 deletion dist/itemsjs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "itemsjs",
"version": "1.0.41",
"version": "1.0.42",
"description": "Created to perform fast search on small json dataset (up to 1000 elements).",
"main": "lib/index.js",
"scripts": {
Expand Down

0 comments on commit f9b4b07

Please sign in to comment.