From f3957ac416476fe19ec49732978f3ac71839718c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Mon, 3 Apr 2017 10:35:50 -0700 Subject: [PATCH] Remove `replaceHolders`. --- .internal/replaceHolders.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .internal/replaceHolders.js diff --git a/.internal/replaceHolders.js b/.internal/replaceHolders.js deleted file mode 100644 index 9f1eea01a..000000000 --- a/.internal/replaceHolders.js +++ /dev/null @@ -1,29 +0,0 @@ -/** Used as the internal argument placeholder. */ -const PLACEHOLDER = '__lodash_placeholder__' - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - let index = -1 - const { length } = array - let resIndex = 0 - const result = [] - - while (++index < length) { - const value = array[index] - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER - result[resIndex++] = index - } - } - return result -} - -export default replaceHolders