(array, property, value, startIndex, endIndex)
| 26 | * @return {array} The input array. |
| 27 | */ |
| 28 | var SetAll = function (array, property, value, startIndex, endIndex) |
| 29 | { |
| 30 | if (startIndex === undefined) { startIndex = 0; } |
| 31 | if (endIndex === undefined) { endIndex = array.length; } |
| 32 | |
| 33 | if (SafeRange(array, startIndex, endIndex)) |
| 34 | { |
| 35 | for (var i = startIndex; i < endIndex; i++) |
| 36 | { |
| 37 | var entry = array[i]; |
| 38 | |
| 39 | if (entry.hasOwnProperty(property)) |
| 40 | { |
| 41 | entry[property] = value; |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | return array; |
| 47 | }; |
| 48 | |
| 49 | module.exports = SetAll; |
no test coverage detected
searching dependent graphs…