Skip to content

Commit

Permalink
remove-node-crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Apr 6, 2024
1 parent 20f2173 commit e50a5e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/composition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const errorBoundry = <F extends Func>(f: F) => {
};

export const pipe: typeof pipeWithoutStack = (...fs) =>
// @ts-expect-error not sure why
errorBoundry(pipeWithoutStack(...fs));

type Reversed<Tuple> = Tuple extends [infer Head, ...infer Rest]
Expand Down
5 changes: 2 additions & 3 deletions src/debug.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { AsyncFunction, Func, ReturnTypeUnwrapped } from "./typing.ts";

import { randomUUID } from "node:crypto";
import { pipe } from "./composition.ts";
import { pairRight } from "./juxt.ts";
import { isPromise } from "./promise.ts";
Expand Down Expand Up @@ -147,7 +146,7 @@ const makeErrorWithId = (id: string) => {
};

export const throwerCatcher = () => {
const id = randomUUID();
const id = crypto.randomUUID();
const catcher = catchErrorWithId(id);
const thrower = () => {
throw makeErrorWithId(id);
Expand All @@ -172,7 +171,7 @@ async (...xs: Parameters<F>) => {
};

export const throwerCatcherWithValue = <T>() => {
const id = randomUUID();
const id = crypto.randomUUID();
const catcher = catchErrorWithIdAndValue<T>(id);
const thrower = (value: T) => {
const e = makeErrorWithId(id);
Expand Down

0 comments on commit e50a5e2

Please sign in to comment.