I'm currently creating a mechanism to filter items by a query string.
I want to convert this to locale-aware version (basically, case-ignorance in English, but also for Japanese Kana):
return items.filter((item) => {
return item.name.indexOf(query) !== -1;
});
I have heard of ES6 Intl.Collation
, and I would like to use it if it achieves my goal.