UNPKG

transition-manager

Version:

Transition Manager. Framework independent transition manager to transition elements using states and actions.

33 lines (28 loc) 646 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); 'use strict'; /** * join two arrays and prevent duplication * @param {array} target * @param {array} arrays * @return {array} */ function unique(target, arrays) { target = target || []; var combined = target.concat(arrays); target = []; var len = combined.length, i = -1, ObjRef; while (++i < len) { ObjRef = combined[i]; if (target.indexOf(ObjRef) === -1 && ObjRef !== '' & ObjRef !== (null || undefined)) { target[target.length] = ObjRef; } } return target; } exports['default'] = unique; module.exports = exports['default'];