1 /** Used as the internal argument placeholder. */
2 var PLACEHOLDER = '__lodash_placeholder__';
5 * Replaces all `placeholder` elements in `array` with an internal placeholder
6 * and returns an array of their indexes.
9 * @param {Array} array The array to modify.
10 * @param {*} placeholder The placeholder to replace.
11 * @returns {Array} Returns the new array of placeholder indexes.
13 function replaceHolders(array, placeholder) {
15 length = array.length,
19 while (++index < length) {
20 if (array[index] === placeholder) {
21 array[index] = PLACEHOLDER;
22 result[++resIndex] = index;
28 module.exports = replaceHolders;