mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 10:27:49 +00:00
Remove semicolons.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/** Used as the internal argument placeholder. */
|
||||
const PLACEHOLDER = '__lodash_placeholder__';
|
||||
const PLACEHOLDER = '__lodash_placeholder__'
|
||||
|
||||
/**
|
||||
* Replaces all `placeholder` elements in `array` with an internal placeholder
|
||||
@@ -11,19 +11,19 @@ const PLACEHOLDER = '__lodash_placeholder__';
|
||||
* @returns {Array} Returns the new array of placeholder indexes.
|
||||
*/
|
||||
function replaceHolders(array, placeholder) {
|
||||
let index = -1;
|
||||
const length = array.length;
|
||||
let resIndex = 0;
|
||||
const result = [];
|
||||
let index = -1
|
||||
const length = array.length
|
||||
let resIndex = 0
|
||||
const result = []
|
||||
|
||||
while (++index < length) {
|
||||
const value = array[index];
|
||||
const value = array[index]
|
||||
if (value === placeholder || value === PLACEHOLDER) {
|
||||
array[index] = PLACEHOLDER;
|
||||
result[resIndex++] = index;
|
||||
array[index] = PLACEHOLDER
|
||||
result[resIndex++] = index
|
||||
}
|
||||
}
|
||||
return result;
|
||||
return result
|
||||
}
|
||||
|
||||
export default replaceHolders;
|
||||
export default replaceHolders
|
||||
|
||||
Reference in New Issue
Block a user