a3d7196c9a6a5a8b0fe84796692bd6e5d9ee32ab
[platform/framework/web/crosswalk-tizen.git] /
1 define(['./difference', './slice'], function (difference, slice) {
2
3     /**
4      * Insert item into array if not already present.
5      */
6     function insert(arr, rest_items) {
7         var diff = difference(slice(arguments, 1), arr);
8         if (diff.length) {
9             Array.prototype.push.apply(arr, diff);
10         }
11         return arr.length;
12     }
13     return insert;
14 });