MCPcopy Create free account
hub / github.com/breck7/scroll / push

Function push

external/.datatables.js:5245–5263  ·  view source on GitHub ↗
(a)

Source from the content-addressed store, hash-verified

5243
5244 function _fnSortResolve(settings, nestedSort, sort) {
5245 var push = function (a) {
5246 if ($.isPlainObject(a)) {
5247 if (a.idx !== undefined) {
5248 // Index based ordering
5249 nestedSort.push([a.idx, a.dir])
5250 } else if (a.name) {
5251 // Name based ordering
5252 var cols = _pluck(settings.aoColumns, "sName")
5253 var idx = cols.indexOf(a.name)
5254
5255 if (idx !== -1) {
5256 nestedSort.push([idx, a.dir])
5257 }
5258 }
5259 } else {
5260 // Plain column index and direction pair
5261 nestedSort.push(a)
5262 }
5263 }
5264
5265 if ($.isPlainObject(sort)) {
5266 // Object

Callers 1

_fnSortResolveFunction · 0.85

Calls 2

_pluckFunction · 0.85
indexOfMethod · 0.80

Tested by

no test coverage detected