JavaScript

Tests

Modules

export function foo() {}

export const bar = () => {};

const baz = () => {};
export default baz;

export default function baz() {};

// INVALID
export default const qux = () => {};

Regex

if (/regex/.test(string)) {
}

Utilities

function range(start, end) {
  return Array.from({ length: end - start + 1 }, (_, i) => start + i)
}