js patters