common/utils

Overview

Junk Drawer!

Misc utility functions

Intentions

A place to put all that code you want to share but don't know where to put it.

Tips & Things to keep in mind

  • Ideally, if it's here, it's reuseable enough that others can use it also. So, the usual tips apply - break the problem down as much as possible so you can compose the solution you need with various parts - making it easier for others to reuse pieces.
  • We've got lodash as a dependency - before adding a new util, see if there is a lodash package that can be imported (& re-exported) as it means we won't need maintain and write the tests.
  • Adding to the above tip: Often you might find a function in lodash you weren't expecting can apply to your problem.

Future considerations

  • It's hard to predict what will end up here - always keeping an eye on possible groupings when working in this area would be helpful