D | array_mutator.js | 42 function annotate(message, replace) { argument 43 if (replace) message += ' (replaced)'; 48 function randomSplice(replace, ...args) { argument 50 const index = random.randInt(0, elements.length - replace); 51 elements.splice(index, replace, ...args); 54 function duplicateElement(replace) { argument 59 annotate('Duplicate an element', replace); 60 randomSplice(replace, babelTypes.cloneDeep(element)); 63 function insertRandomValue(replace) { argument 64 annotate('Insert a random value', replace); [all …]
|