This site runs best with JavaScript enabled.

Small JS helper functions using ES6

Kevin Beck

June 05, 2019

To speed up our development process and stop re-writing code we use helper functions such as debounce or get scroll direction. To do this we use helper functions stored in ES6 modules and imported where needed.

export function yourNamedFunction(arguments) {
// Do things with the arguments
return; // Return something

This can then be used by importing it:

import { yourNamedFunction } from "../file-name";