How to use the unique function from grunt

Find comprehensive JavaScript grunt.unique code examples handpicked from public code repositorys.

21
22
23
24
25
26
27
28
29
});
options.compareAgainst = options.compareAgainst || '';

var sanitizePath = function (name, patterns) {
  var unwanted = [];
  unwanted = _.unique(_.flatten(_.union([], unwanted, options.srcSanitize || [])));
  var re = new RegExp('(?:' + unwanted.join('|') + ')[-_]?', 'g');
  return name.replace(re, '');
};
fork icon361
star icon0
watch icon3