From 87983464d8a331c1ddd09eced9920269a759f0a9 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Sat, 7 Jan 2023 07:09:48 -0800 Subject: Implement DNS module (#1691) * Boilerplate for DNS stuff * Add c-ares * lookup * make * Implement dns.lookup * Create c-ares * wip * normalize * repro * Revert "repro" This reverts commit 8b93e0c295b335b8882a9601da47720348549beb. * Implement macOS `getaddrinfo_async_start` * embiggen * Update string_immutable.zig * Update Makefile * alright * Update .gitignore * Add types * more ccache * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update bun.d.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/string_immutable.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/string_immutable.zig') diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 7c2b61c03..29b692ffb 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -3974,6 +3974,14 @@ pub fn isIPAddress(input: []const u8) bool { } } +pub fn isIPV6Address(input: []const u8) bool { + if (std.net.Address.parseIp6(input, 0)) |_| { + return true; + } else |_| { + return false; + } +} + pub fn cloneNormalizingSeparators( allocator: std.mem.Allocator, input: []const u8, -- cgit v1.2.3