Making src/shared/function.js adhere to the style guide