2023-12-04 10:35:34 +02:00
|
|
|
<template>
|
|
|
|
<h2 class="tool-title">Str remove duplicate lines</h2>
|
|
|
|
<hr class="mt-5 mb-5">
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="data">Data</label>
|
2023-12-15 12:11:46 +02:00
|
|
|
<textarea id="data" v-model="toolData.data"></textarea>
|
2023-12-04 10:35:34 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<hr class="mt-5 mb-5">
|
|
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
<label for="result">Result</label>
|
2023-12-15 12:11:46 +02:00
|
|
|
<textarea id="result" v-model="toolResult"></textarea>
|
2023-12-04 10:35:34 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
function arrayUnique(value, index, array) {
|
|
|
|
return array.indexOf(value) === index;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
toolData: {
|
|
|
|
data: '',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
toolResult() {
|
|
|
|
return this.toolData.data.split('\n').filter(arrayUnique).join('\n');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
</style>
|