(a, prop, prop2)
| 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` |
no outgoing calls
no test coverage detected