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

Function _pluck

external/.datatables.js:1120–1142  ·  view source on GitHub ↗
(a, prop, prop2)

Source from the content-addressed store, hash-verified

1118 }
1119
1120 var _pluck = function (a, prop, prop2) {
1121 var out = []
1122 var i = 0,
1123 ien = a.length
1124
1125 // Could have the test in the loop for slightly smaller code, but speed
1126 // is essential here
1127 if (prop2 !== undefined) {
1128 for (; i < ien; i++) {
1129 if (a[i] && a[i][prop]) {
1130 out.push(a[i][prop][prop2])
1131 }
1132 }
1133 } else {
1134 for (; i < ien; i++) {
1135 if (a[i]) {
1136 out.push(a[i][prop])
1137 }
1138 }
1139 }
1140
1141 return out
1142 }
1143
1144 // Basically the same as _pluck, but rather than looping over `a` we use `order`
1145 // as the indexes to pick from `a`

Callers 10

_fnGetDataMasterFunction · 0.85
_fnBuildHeadFunction · 0.85
pushFunction · 0.85
_fnSortAddFunction · 0.85
_fnSortingClassesFunction · 0.85
_toSettingsFunction · 0.85
__details_eventsFunction · 0.85
__column_selectorFunction · 0.85
__setColumnVisFunction · 0.85
.datatables.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected