@ztimson/utils 0.25.16 → 0.25.18

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/dist/misc.d.ts CHANGED
@@ -1,4 +1,11 @@
1
1
  import { PathEvent } from './path-events.ts';
2
+ /**
3
+ * Escape any regex special characters to avoid misinterpretation during search
4
+ *
5
+ * @param {string} value String which should be escaped
6
+ * @return {string} New escaped sequence
7
+ */
8
+ export declare function escapeRegex(value: string): string;
2
9
  /**
3
10
  * Run a stringified function with arguments asynchronously
4
11
  * @param {object} args Map of key/value arguments
@@ -16,12 +23,11 @@ export declare function fn<T>(args: object, fn: string, async?: boolean): T;
16
23
  */
17
24
  export declare function gravatar(email: string, def?: string): string;
18
25
  /**
19
- * Escape any regex special characters to avoid misinterpretation during search
20
- *
21
- * @param {string} value String which should be escaped
22
- * @return {string} New escaped sequence
26
+ * Convert IPv6 to v4 because who uses that, NAT4Life
27
+ * @param {string} ip IPv6 address, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334
28
+ * @returns {string | null} IPv4 address, e.g. 172.16.58.3
23
29
  */
24
- export declare function escapeRegex(value: string): string;
30
+ export declare function ipV6ToV4(ip: string): string | null;
25
31
  /**
26
32
  * Represents a function that listens for events and handles them accordingly.
27
33
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ztimson/utils",
3
- "version": "0.25.16",
3
+ "version": "0.25.18",
4
4
  "description": "Utility library",
5
5
  "author": "Zak Timson",
6
6
  "license": "MIT",