UNPKG

@tiptap/core

Version:

headless rich text editor

6 lines (4 loc) 172 B
export function findDuplicates(items: any[]): any[] { const filtered = items.filter((el, index) => items.indexOf(el) !== index) return Array.from(new Set(filtered)) }