simple javascript validation / comparison library