Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
437 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | "use strict";
|
---|
| 2 |
|
---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
---|
| 4 | value: true
|
---|
| 5 | });
|
---|
| 6 | exports.default = uniqueExcept;
|
---|
| 7 |
|
---|
| 8 | function uniqueExcept(exclude) {
|
---|
| 9 | return function unique() {
|
---|
| 10 | const list = Array.prototype.concat.apply([], arguments);
|
---|
| 11 | return list.filter((item, i) => {
|
---|
| 12 | if (item.toLowerCase() === exclude) {
|
---|
| 13 | return true;
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | return i === list.indexOf(item);
|
---|
| 17 | });
|
---|
| 18 | };
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | module.exports = exports.default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.