You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
482 B

4 years ago
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = uniqueExcept;
  6. function uniqueExcept(exclude) {
  7. return function unique() {
  8. const list = Array.prototype.concat.apply([], arguments);
  9. return list.filter((item, i) => {
  10. if (item.toLowerCase() === exclude) {
  11. return true;
  12. }
  13. return i === list.indexOf(item);
  14. });
  15. };
  16. };
  17. module.exports = exports["default"];