Skip to content

Commit

Permalink
refactor(arrays): update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Sep 10, 2021
1 parent 890936b commit ad3c3af
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/arrays/src/binary-search.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Comparator, Fn, FnN, FnN2 } from "@thi.ng/api";
import { compare, compareNumAsc } from "@thi.ng/compare";
import { compare } from "@thi.ng/compare/compare";
import { compareNumAsc } from "@thi.ng/compare/numeric";

/**
* Returns the supposed index of `x` in pre-sorted array-like collection
Expand Down
3 changes: 2 additions & 1 deletion packages/arrays/src/ensure-array.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isArray, isArrayLike } from "@thi.ng/checks";
import { isArray } from "@thi.ng/checks/is-array";
import { isArrayLike } from "@thi.ng/checks/is-arraylike";
import { ensureIterable } from "./ensure-iterable";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/ensure-iterable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { illegalArgs } from "@thi.ng/errors";
import { illegalArgs } from "@thi.ng/errors/illegal-arguments";

/**
* Attempts to obtain an iterator from `x` and throws error if `x` is
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/is-sorted.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Comparator } from "@thi.ng/api";
import { compare } from "@thi.ng/compare";
import { compare } from "@thi.ng/compare/compare";

/**
* Returns true if the given array and its elements in the selected
Expand Down
2 changes: 1 addition & 1 deletion packages/arrays/src/quicksort.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Comparator, Fn3, TypedArray } from "@thi.ng/api";
import { compare } from "@thi.ng/compare";
import { compare } from "@thi.ng/compare/compare";
import { swap } from "./swap";

/**
Expand Down
6 changes: 4 additions & 2 deletions packages/arrays/src/shuffle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { assert, TypedArray } from "@thi.ng/api";
import { IRandom, SYSTEM } from "@thi.ng/random";
import type { TypedArray } from "@thi.ng/api";
import { assert } from "@thi.ng/api/assert";
import type { IRandom } from "@thi.ng/random";
import { SYSTEM } from "@thi.ng/random/system";
import type { AnyArray } from "./api";

/**
Expand Down
7 changes: 4 additions & 3 deletions packages/arrays/src/sort-cached.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { assert, Comparator, Fn } from "@thi.ng/api";
import { isFunction } from "@thi.ng/checks";
import { compare } from "@thi.ng/compare";
import type { Comparator, Fn } from "@thi.ng/api";
import { assert } from "@thi.ng/api/assert";
import { isFunction } from "@thi.ng/checks/is-function";
import { compare } from "@thi.ng/compare/compare";
import { quickSort } from "./quicksort";
import { multiSwap } from "./swap";

Expand Down

0 comments on commit ad3c3af

Please sign in to comment.