@url-sanitize/clearurls 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @url-sanitize/clearurls
2
2
 
3
3
  ClearURLs-compatible rule catalog and adapter for [`@url-sanitize/core`](../core).
4
+ Use it to remove tracking parameters such as `utm_*` and `fbclid`, and to
5
+ unwrap known tracking redirectors.
4
6
 
5
7
  Ships a snapshot of the ClearURLs ruleset, daily-synced from upstream
6
8
  `https://rules2.clearurls.xyz/data.minify.json` with SHA256 verification.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { SanitizerCatalog } from '@url-sanitize/core';
1
+ import { SanitizerCatalog, Sanitizer } from '@url-sanitize/core';
2
2
  import { C as ClearUrlsData, a as ClearUrlsMetadata } from './types-DHX4A7iO.js';
3
3
  export { b as ClearUrlsProvider } from './types-DHX4A7iO.js';
4
4
 
@@ -6,5 +6,6 @@ declare function clearurlsToCatalog(data: ClearUrlsData, meta: ClearUrlsMetadata
6
6
 
7
7
  declare const clearurlsCatalog: SanitizerCatalog;
8
8
  declare const clearurlsMetadata: ClearUrlsMetadata;
9
+ declare const sanitize: Sanitizer;
9
10
 
10
- export { ClearUrlsData, ClearUrlsMetadata, clearurlsCatalog, clearurlsMetadata, clearurlsToCatalog };
11
+ export { ClearUrlsData, ClearUrlsMetadata, clearurlsCatalog, clearurlsMetadata, clearurlsToCatalog, sanitize };
package/dist/index.js CHANGED
@@ -3,6 +3,9 @@ import {
3
3
  metadata_default
4
4
  } from "./chunk-TAQSU2JX.js";
5
5
 
6
+ // src/index.ts
7
+ import { compileSanitizer } from "@url-sanitize/core";
8
+
6
9
  // src/adapter.ts
7
10
  function clearurlsToCatalog(data, meta) {
8
11
  const rules = [];
@@ -85,8 +88,10 @@ var clearurlsCatalog = clearurlsToCatalog(
85
88
  metadata_default
86
89
  );
87
90
  var clearurlsMetadata = metadata_default;
91
+ var sanitize = compileSanitizer(clearurlsCatalog);
88
92
  export {
89
93
  clearurlsCatalog,
90
94
  clearurlsMetadata,
91
- clearurlsToCatalog
95
+ clearurlsToCatalog,
96
+ sanitize
92
97
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@url-sanitize/clearurls",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "ClearURLs-compatible rule catalog and adapter for @url-sanitize/core. Daily-synced from upstream.",
5
5
  "license": "LGPL-3.0-only",
6
6
  "type": "module",
@@ -23,7 +23,7 @@
23
23
  "NOTICE"
24
24
  ],
25
25
  "dependencies": {
26
- "@url-sanitize/core": "0.1.0"
26
+ "@url-sanitize/core": "0.1.3"
27
27
  },
28
28
  "keywords": [
29
29
  "clearurls",