UNPKG

web-highlighter

Version:

✨A no-runtime dependency lib for text highlighting & persistence on any website ✨🖍️

15 lines (12 loc) 225 B
/** * support IE 10 */ export const unique = <T>(arr: T[]): T[] => { const res: T[] = []; for (const el of arr) { if (res.indexOf(el) === -1) { res.push(el); } } return res; };