Skip to content

Commit

Permalink
feat(operators) aliased customTest as test
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmay committed Aug 20, 2018
1 parent b109046 commit 31691de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ const GuardEach = <T>(
export { Guard, GuardEach };

export { isNumber, isString, isBoolean, isArray } from "./guards/guards";
export { compose, and, or, optional, nullable, erratic, unsafeTest, customTest } from "./operators/operators";
export { compose, and, or, optional, nullable, erratic, customTest, test, unsafeTest } from "./operators/operators";
4 changes: 3 additions & 1 deletion src/operators/operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const compose = and;
const customTest = <T>(test: TypedTest<T>) => (x: Erratic<T>): x is T =>
isErratic(x) ? false : test(x);

const test = customTest;

const unsafeTest = <T>(test: TypedTest<Erratic<T>>) => (x: Erratic<T>): x is T =>
test(x);

export { compose, and, or, optional, nullable, erratic, customTest, unsafeTest };
export { compose, and, or, optional, nullable, erratic, customTest, test, unsafeTest };

0 comments on commit 31691de

Please sign in to comment.