valMap for javascript