pulled out the code to match JS hashes into its own fuction in prep for terminting based on indent