static-engine-sort
v4.10.2
Published
Plugin for static-engine. Sorts the collection using the provided sort function.
Downloads
8
Readme
static-engine-sort
This is a plugin for static-engine. Sorts the collection using the provided sort function.
var engine = require('static-engine')
var sort = require('static-engine-sort')
var pluginA = require('plugin-a')
engine([
pluginA,
sort(function (a, b) {
if (a.property < b.property) {
return -1
}
if (b.property < a.property) {
return 1
}
return 0
})
])