mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
fix(window): some more bin things (#8612)
* allow linking bins that do not exist. * fix some things
This commit is contained in:
@@ -5948,3 +5948,10 @@ pub inline fn indexOfScalar(input: anytype, scalar: std.meta.Child(@TypeOf(input
|
||||
pub fn containsScalar(input: anytype, item: std.meta.Child(@TypeOf(input))) bool {
|
||||
return indexOfScalar(input, item) != null;
|
||||
}
|
||||
|
||||
pub fn withoutSuffixComptime(input: []const u8, comptime suffix: []const u8) []const u8 {
|
||||
if (hasSuffixComptime(input, suffix)) {
|
||||
return input[0 .. input.len - suffix.len];
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user