tiny-escape 1.0.1 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +5 -2
package/README.md CHANGED
@@ -42,6 +42,8 @@ re.test(userInput); // true
42
42
 
43
43
  ## Differences from `escape-string-regexp`
44
44
 
45
+ `escape-string-regexp` v5 is ESM-only. If you `require("escape-string-regexp")` you get `ERR_REQUIRE_ESM`. `tiny-escape` works with both `import` and `require()`.
46
+
45
47
  | | `escape-string-regexp` | `tiny-escape` |
46
48
  | ----------- | ---------------------- | ------------- |
47
49
  | CJS support | v4 only (v5 ESM-only) | ESM + CJS |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tiny-escape",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Escape special characters for use in regular expressions. Like escape-string-regexp, ships ESM + CJS.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -70,9 +70,12 @@
70
70
  "escape-string-regexp",
71
71
  "string",
72
72
  "sanitize",
73
- "drop-in-replacement",
73
+ "commonjs",
74
+ "dual-package",
75
+ "err-require-esm",
74
76
  "typescript",
75
77
  "esm",
78
+ "cjs",
76
79
  "zero-dependency"
77
80
  ],
78
81
  "author": "Ofer Shapira <ofer@ofershap.dev>",