diff options
author | 2021-06-06 18:34:01 -0700 | |
---|---|---|
committer | 2021-06-06 18:34:01 -0700 | |
commit | d49e0a5fa129152c27b70a57d1cc7a2af770577c (patch) | |
tree | 1ac581bda71fec5dfd09a6ab508a1adfca80b358 /src/fs.zig | |
parent | e66466cc1a453db1370a199a32729441747761bb (diff) | |
download | bun-d49e0a5fa129152c27b70a57d1cc7a2af770577c.tar.gz bun-d49e0a5fa129152c27b70a57d1cc7a2af770577c.tar.zst bun-d49e0a5fa129152c27b70a57d1cc7a2af770577c.zip |
WIP node module bundles
Former-commit-id: 797b2ff557542e9d318c953b840b102695711888
Diffstat (limited to 'src/fs.zig')
-rw-r--r-- | src/fs.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fs.zig b/src/fs.zig index 77e85dcac..7dbcc4f40 100644 --- a/src/fs.zig +++ b/src/fs.zig @@ -970,6 +970,10 @@ pub const Path = struct { name: PathName, is_disabled: bool = false, + pub fn jsonStringify(self: *const @This(), options: anytype, writer: anytype) !void { + return try std.json.stringify(self.text, options, writer); + } + pub fn generateKey(p: *Path, allocator: *std.mem.Allocator) !string { return try std.fmt.allocPrint(allocator, "{s}://{s}", .{ p.namespace, p.text }); } |