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

Function _pluck_order

external/.datatables.js:1146–1168  ·  view source on GitHub ↗
(a, order, prop, prop2)

Source from the content-addressed store, hash-verified

1144 // Basically the same as _pluck, but rather than looping over `a` we use `order`
1145 // as the indexes to pick from `a`
1146 var _pluck_order = function (a, order, prop, prop2) {
1147 var out = []
1148 var i = 0,
1149 ien = order.length
1150
1151 // Could have the test in the loop for slightly smaller code, but speed
1152 // is essential here
1153 if (prop2 !== undefined) {
1154 for (; i < ien; i++) {
1155 if (a[order[i]] && a[order[i]][prop]) {
1156 out.push(a[order[i]][prop][prop2])
1157 }
1158 }
1159 } else {
1160 for (; i < ien; i++) {
1161 if (a[order[i]]) {
1162 out.push(a[order[i]][prop])
1163 }
1164 }
1165 }
1166
1167 return out
1168 }
1169
1170 var _range = function (len, start) {
1171 var out = []

Callers 3

runFunction · 0.85
.datatables.jsFile · 0.85
__cell_selectorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected