node:crypto: implement hkdf and hkdfSync (#18312)

This commit is contained in:
Dylan Conway
2025-03-21 01:03:01 -07:00
committed by GitHub
parent 2aeff10a85
commit a3585ff961
56 changed files with 1185 additions and 429 deletions

View File

@@ -27,9 +27,9 @@ pub export fn NodeModuleModule__findPath(
const found = if (paths_maybe) |paths| found: {
var iter = paths.iterator(global);
while (iter.next()) |path| {
const cur_path = bun.String.tryFromJS(path, global) orelse {
if (global.hasException()) return .zero;
continue;
const cur_path = bun.String.fromJS(path, global) catch |err| switch (err) {
error.JSError => return .zero,
error.OutOfMemory => return global.throwOutOfMemoryValue(),
};
defer cur_path.deref();