mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
feat(bundler): implement enum inlining / more constant folding (#12144)
Co-authored-by: paperdave <paperdave@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -200,11 +200,6 @@ pub inline fn isNPMPackageName(target: string) bool {
|
||||
return !scoped or slash_index > 0 and slash_index + 1 < target.len;
|
||||
}
|
||||
|
||||
pub inline fn indexAny(in: anytype, target: string) ?usize {
|
||||
for (in, 0..) |str, i| if (indexOf(str, target) != null) return i;
|
||||
return null;
|
||||
}
|
||||
|
||||
pub inline fn indexAnyComptime(target: string, comptime chars: string) ?usize {
|
||||
for (target, 0..) |parent, i| {
|
||||
inline for (chars) |char| {
|
||||
|
||||
Reference in New Issue
Block a user