Compilation of commonly used JS functions written simply and elegantly.