{"id":9221,"date":"2025-08-08T09:35:48","date_gmt":"2025-08-07T23:35:48","guid":{"rendered":"https:\/\/kijo.flickdevs.com\/?page_id=9221"},"modified":"2025-08-08T09:41:18","modified_gmt":"2025-08-07T23:41:18","slug":"filter-combiner-and-cleaner","status":"publish","type":"page","link":"https:\/\/kijo.flickdevs.com\/nl_be\/filter-combiner-and-cleaner\/","title":{"rendered":"Filter Combiner and Cleaner"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>Filter Combiner and Cleaner<\/title>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n  <link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\">\n  <style>\n    body { background: #f8f9fa; }\n    .container { max-width: 700px; margin: 40px auto; background: #fff; padding: 2rem 2.5rem; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.07);}\n    textarea { font-family: monospace; }\n    .result-section { margin-top: 2rem; }\n    .footer { margin-top: 2.5rem; font-size: 0.95rem; color: #888; text-align: center; }\n    .cleaned-list { word-break: break-all; font-size: 1rem; background: #f1f3f4; padding: 0.75rem; border-radius: 6px; }\n    .mode-label { font-weight: 500; margin-right: 0.5em; }\n  <\/style>\n<\/head>\n<body>\n  <div class=\"container\">\n    <h1 class=\"mb-4\">Filter Combiner and Cleaner<\/h1>\n    <p>\n      Paste your <b>comma-separated words<\/b> below. This tool will remove duplicates, sort the words (letters first, numbers last), and in <b>Includer<\/b> mode, for any word ending in <b>s, &#8216;s, or s&#8217;<\/b> will also add the base form (e.g. <code>codes<\/code> adds <code>code<\/code> if not present). In <b>Excluder<\/b> mode, only deduplication and sorting is performed.\n    <\/p>\n    <form id=\"filterForm\">\n      <div class=\"mb-3\">\n        <label for=\"filters\" class=\"form-label\">Words (comma-separated):<\/label>\n        <textarea class=\"form-control\" id=\"filters\" rows=\"4\" placeholder=\"e.g. codes,code's,cods,cod's,apple,2fast\"><\/textarea>\n      <\/div>\n      <div class=\"mb-3 d-flex align-items-center\">\n        <span class=\"mode-label\">Mode:<\/span>\n        <select class=\"form-select w-auto\" id=\"mode\" style=\"min-width: 140px;\">\n          <option value=\"includer\" selected>Includer<\/option>\n          <option value=\"excluder\">Excluder<\/option>\n        <\/select>\n      <\/div>\n      <button type=\"submit\" class=\"btn btn-primary\">Clean &#038; Sort<\/button>\n    <\/form>\n    <div id=\"results\" class=\"result-section\"><\/div>\n    <div class=\"footer\">\n      &copy; 2025 Filter Combiner and Cleaner &mdash; WordPress Compatible HTML\n    <\/div>\n  <\/div>\n  <script>\n    function getBaseForm(word) {\n      \/\/ Remove trailing 's, s', or s (case-insensitive)\n      \/\/ e.g. codes -> code, code's -> code, cods -> cod, cod's -> cod\n      let lower = word.toLowerCase();\n      if (lower.endsWith(\"'s\")) {\n        return word.slice(0, -2);\n      } else if (lower.endsWith(\"s'\")) {\n        return word.slice(0, -2);\n      } else if (lower.endsWith(\"s\")) {\n        \/\/ Only remove 's' if the word is longer than 1 character\n        return word.length > 1 ? word.slice(0, -1) : word;\n      }\n      return word;\n    }\n\n    function cleanAndSortFilters(input, mode) {\n      \/\/ Split, trim, remove empty, deduplicate (case-insensitive)\n      let words = input\n        .split(',')\n        .map(w => w.trim())\n        .filter(w => w.length > 0);\n\n      \/\/ Remove duplicates (case-insensitive, but preserve original case in output)\n      let seen = new Set();\n      let uniqueWords = [];\n      for (let word of words) {\n        let key = word.toLowerCase();\n        if (!seen.has(key)) {\n          seen.add(key);\n          uniqueWords.push(word);\n        }\n      }\n\n      let allWords;\n      if (mode === \"includer\") {\n        \/\/ For each word, add its base form if not already present (case-insensitive)\n        allWords = [...uniqueWords];\n        for (let word of uniqueWords) {\n          let base = getBaseForm(word);\n          let baseKey = base.toLowerCase();\n          if (base !== word && base.length > 0 && !seen.has(baseKey)) {\n            seen.add(baseKey);\n            allWords.push(base);\n          }\n        }\n      } else {\n        \/\/ Excluder mode: just deduplicate and sort\n        allWords = uniqueWords;\n      }\n\n      \/\/ Separate into letter-first and number-first\n      let letterWords = [];\n      let numberWords = [];\n      for (let word of allWords) {\n        if (\/^[A-Za-z]\/.test(word)) {\n          letterWords.push(word);\n        } else if (\/^[0-9]\/.test(word)) {\n          numberWords.push(word);\n        } else {\n          \/\/ If neither, treat as letter (e.g. symbols)\n          letterWords.push(word);\n        }\n      }\n\n      \/\/ Sort each group alphabetically (case-insensitive)\n      letterWords.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));\n      numberWords.sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));\n\n      \/\/ Combine\n      return [...letterWords, ...numberWords];\n    }\n\n    document.getElementById('filterForm').addEventListener('submit', function(e) {\n      e.preventDefault();\n      const input = document.getElementById('filters').value;\n      const mode = document.getElementById('mode').value;\n      const resultsDiv = document.getElementById('results');\n      resultsDiv.innerHTML = '';\n\n      if (!input.trim()) {\n        resultsDiv.innerHTML = '<div class=\"alert alert-danger\">Please enter some comma-separated words.<\/div>';\n        return;\n      }\n\n      const cleaned = cleanAndSortFilters(input, mode);\n\n      resultsDiv.innerHTML = `\n        <div class=\"result-section\">\n          <h5>Cleaned & Sorted List${mode === \"includer\" ? \" (with base forms)\" : \"\"}:<\/h5>\n          <div class=\"cleaned-list\">${cleaned.join(', ')}<\/div>\n        <\/div>\n        <div class=\"mt-3 text-muted\">Total unique words${mode === \"includer\" ? \" (including base forms)\" : \"\"}: ${cleaned.length}<\/div>\n      `;\n    });\n  <\/script>\n<\/body>\n<\/html>\n\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Filter Combiner and Cleaner Filter Combiner and Cleaner Paste your comma-separated words below. This tool will remove duplicates, sort the words (letters first, numbers last), and in Includer mode, for any word ending in s, &#8216;s, or s&#8217; will also add the base form (e.g. codes adds code if not present). In Excluder mode, only [&hellip;]<\/p>\n","protected":false},"author":108378207,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"class_list":["post-9221","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.7 (Yoast SEO v28.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Filter Combiner and Cleaner - Swoopa<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kijo.flickdevs.com\/nl_be\/filter-combiner-and-cleaner\/\" \/>\n<meta property=\"og:locale\" content=\"nl_BE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Filter Combiner and Cleaner\" \/>\n<meta property=\"og:description\" content=\"Filter Combiner and Cleaner Filter Combiner and Cleaner Paste your comma-separated words below. This tool will remove duplicates, sort the words (letters first, numbers last), and in Includer mode, for any word ending in s, &#8216;s, or s&#8217; will also add the base form (e.g. codes adds code if not present). In Excluder mode, only [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kijo.flickdevs.com\/nl_be\/filter-combiner-and-cleaner\/\" \/>\n<meta property=\"og:site_name\" content=\"Swoopa\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-07T23:41:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/kijo.flickdevs.com\/wp-content\/uploads\/2024\/01\/swoopappicon_144x144.png\" \/>\n\t<meta property=\"og:image:width\" content=\"512\" \/>\n\t<meta property=\"og:image:height\" content=\"512\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minuut\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/filter-combiner-and-cleaner\\\/\",\"url\":\"https:\\\/\\\/kijo.flickdevs.com\\\/filter-combiner-and-cleaner\\\/\",\"name\":\"Filter Combiner and Cleaner - Swoopa\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#website\"},\"datePublished\":\"2025-08-07T23:35:48+00:00\",\"dateModified\":\"2025-08-07T23:41:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/filter-combiner-and-cleaner\\\/#breadcrumb\"},\"inLanguage\":\"nl-BE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kijo.flickdevs.com\\\/filter-combiner-and-cleaner\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/filter-combiner-and-cleaner\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kijo.flickdevs.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Filter Combiner and Cleaner\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#website\",\"url\":\"https:\\\/\\\/kijo.flickdevs.com\\\/\",\"name\":\"Swoopa\",\"description\":\"Instant Marketplace Notifications\",\"publisher\":{\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#organization\"},\"alternateName\":\"Marketplace Notifications\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kijo.flickdevs.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nl-BE\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#organization\",\"name\":\"Swoopa\",\"alternateName\":\"Marketplace Notifications\",\"url\":\"https:\\\/\\\/kijo.flickdevs.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-BE\",\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/getswoopa.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/swoopappicon_144x144.png?fit=512%2C512&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/getswoopa.com\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/swoopappicon_144x144.png?fit=512%2C512&ssl=1\",\"width\":512,\"height\":512,\"caption\":\"Swoopa\"},\"image\":{\"@id\":\"https:\\\/\\\/kijo.flickdevs.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Filter Combiner and Cleaner - Swoopa","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kijo.flickdevs.com\/nl_be\/filter-combiner-and-cleaner\/","og_locale":"nl_BE","og_type":"article","og_title":"Filter Combiner and Cleaner","og_description":"Filter Combiner and Cleaner Filter Combiner and Cleaner Paste your comma-separated words below. This tool will remove duplicates, sort the words (letters first, numbers last), and in Includer mode, for any word ending in s, &#8216;s, or s&#8217; will also add the base form (e.g. codes adds code if not present). In Excluder mode, only [&hellip;]","og_url":"https:\/\/kijo.flickdevs.com\/nl_be\/filter-combiner-and-cleaner\/","og_site_name":"Swoopa","article_modified_time":"2025-08-07T23:41:18+00:00","og_image":[{"width":512,"height":512,"url":"https:\/\/kijo.flickdevs.com\/wp-content\/uploads\/2024\/01\/swoopappicon_144x144.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Geschatte leestijd":"1 minuut"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kijo.flickdevs.com\/filter-combiner-and-cleaner\/","url":"https:\/\/kijo.flickdevs.com\/filter-combiner-and-cleaner\/","name":"Filter Combiner and Cleaner - Swoopa","isPartOf":{"@id":"https:\/\/kijo.flickdevs.com\/#website"},"datePublished":"2025-08-07T23:35:48+00:00","dateModified":"2025-08-07T23:41:18+00:00","breadcrumb":{"@id":"https:\/\/kijo.flickdevs.com\/filter-combiner-and-cleaner\/#breadcrumb"},"inLanguage":"nl-BE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kijo.flickdevs.com\/filter-combiner-and-cleaner\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kijo.flickdevs.com\/filter-combiner-and-cleaner\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/kijo.flickdevs.com\/"},{"@type":"ListItem","position":2,"name":"Filter Combiner and Cleaner"}]},{"@type":"WebSite","@id":"https:\/\/kijo.flickdevs.com\/#website","url":"https:\/\/kijo.flickdevs.com\/","name":"Swoopa","description":"Directe marktplaatsmeldingen","publisher":{"@id":"https:\/\/kijo.flickdevs.com\/#organization"},"alternateName":"Marketplace Notifications","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kijo.flickdevs.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nl-BE"},{"@type":"Organization","@id":"https:\/\/kijo.flickdevs.com\/#organization","name":"Swoopa","alternateName":"Marketplace Notifications","url":"https:\/\/kijo.flickdevs.com\/","logo":{"@type":"ImageObject","inLanguage":"nl-BE","@id":"https:\/\/kijo.flickdevs.com\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/getswoopa.com\/wp-content\/uploads\/2024\/01\/swoopappicon_144x144.png?fit=512%2C512&ssl=1","contentUrl":"https:\/\/i0.wp.com\/getswoopa.com\/wp-content\/uploads\/2024\/01\/swoopappicon_144x144.png?fit=512%2C512&ssl=1","width":512,"height":512,"caption":"Swoopa"},"image":{"@id":"https:\/\/kijo.flickdevs.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/pages\/9221","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/users\/108378207"}],"replies":[{"embeddable":true,"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/comments?post=9221"}],"version-history":[{"count":0,"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/pages\/9221\/revisions"}],"wp:attachment":[{"href":"https:\/\/kijo.flickdevs.com\/nl_be\/wp-json\/wp\/v2\/media?parent=9221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}