defining better select/has operations for js lists