* update function documentation and name to match js convention * add additional documentation explaining what the function does * add tests for checkFlatCase function * fix standard.js errors