mirror of
https://github.com/langchain-ai/langgraphjs-api.git
synced 2026-07-21 16:55:31 -04:00
16 lines
393 B
JavaScript
16 lines
393 B
JavaScript
export function $(strings, ...rest) {
|
|
const command = strings.reduce((acc, item, idx) => {
|
|
acc += item;
|
|
const arg = rest[idx];
|
|
if (Array.isArray(arg)) {
|
|
acc += arg.join(" ");
|
|
} else if (typeof arg === "string" || typeof arg === "number") {
|
|
acc += arg;
|
|
}
|
|
return acc;
|
|
}, "$ ");
|
|
|
|
process.stderr.write(command + "\n");
|
|
return Bun.$(strings, ...rest);
|
|
}
|