From 946bbfa548fbdad17980a535baaba70bbd56b499 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sat, 10 May 2025 18:53:56 -0700 Subject: NPM is huuuge on debian. Just download the native release of bitwarden. Same with ansible, but use a docker container for that lazy loaded goooodnesssss. --- utils/mod.ts | 1 + utils/prepend.ts | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 utils/prepend.ts (limited to 'utils') diff --git a/utils/mod.ts b/utils/mod.ts index 93457f0..8c5dc45 100644 --- a/utils/mod.ts +++ b/utils/mod.ts @@ -2,3 +2,4 @@ export * from "./env.ts"; export * from "./run.ts"; export * from "./secret.ts"; export * from "./validate_identifier.ts"; +export * from "./prepend.ts"; diff --git a/utils/prepend.ts b/utils/prepend.ts new file mode 100644 index 0000000..9b77aff --- /dev/null +++ b/utils/prepend.ts @@ -0,0 +1,4 @@ +export const prependWith = (arr: string[], prep: string) => + Array(arr.length * 2).fill(0) + .map((_, i) => i % 2 === 0) + .map((isPrep, i) => isPrep ? prep : arr[i]); -- cgit v1.2.3-70-g09d2