Using JavaScript Proxies to Make Sorting Arrays Safe