UNPKG

@kademi/keditor

Version:

KEditor is a jQuery plugin which provides a content editor with drag n drop, configurable contents

13 lines (10 loc) 337 B
export default function (categories) { let newArray = []; for (let i = 0; i < categories.length; i++) { let category = categories[i] || ''; if (category !== '' && $.inArray(category, newArray) === -1) { newArray.push(category); } } return newArray.sort(); };