Try out the P42 codemods in the browser, without installing anything. You can copy & paste your own code.
Arrow functions are a concise syntax that can often replace the regular function syntax.
let and const are block-scope variable declarations that can replace 'var' declarations in many cases.
Default parameters allow providing default values for function parameters.
for...of loops over iterable objects, for example arrays or strings.
The nullish coalescing operator (??) returns its right side when its left side is nullish (null or undefined), and its left side otherwise.
The spread syntax (...) allows iterables like array expressions to be expanded in place where arguments are expected.
Template literals are string templates that can include variables and expressions.
Convert variable declarations with multiple variables into separate declarations that declare one variable each.