Repository: marpple/FxTS
Pull request #33 (2021-12-02 02:09:38)

chore: set custom variable
Users may be confused about the error phrase, so it is displayed in a custom variable -> ''


Patch:
diff --git a/src/Lazy/append.ts b/src/Lazy/append.ts
index 58d262e8..f9114b69 100644
--- a/src/Lazy/append.ts
+++ b/src/Lazy/append.ts
@@ -128,7 +128,7 @@ function append<A, B extends Iterable<A> | AsyncIterable<A>>(
     return sync(a, iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default append;
diff --git a/src/Lazy/chunk.ts b/src/Lazy/chunk.ts
index 4c3fe3df..adec6c39 100644
--- a/src/Lazy/chunk.ts
+++ b/src/Lazy/chunk.ts
@@ -145,7 +145,7 @@ function chunk<T extends Iterable<unknown> | AsyncIterable<unknown>>(
     }
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default chunk;
diff --git a/src/Lazy/compact.ts b/src/Lazy/compact.ts
index 3e18516c..d9d76c46 100644
--- a/src/Lazy/compact.ts
+++ b/src/Lazy/compact.ts
@@ -57,7 +57,7 @@ function compact<T extends Iterable<unknown> | AsyncIterable<unknown>>(
     return filter(isNotNullable, iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default compact;
diff --git a/src/Lazy/concat.ts b/src/Lazy/concat.ts
index ad68f49e..88c1b13c 100644
--- a/src/Lazy/concat.ts
+++ b/src/Lazy/concat.ts
@@ -91,39 +91,41 @@ function toAsyncIterable<T>(
 function concat<
   A extends Iterable<unknown> | AsyncIterable<unknown>,
   B extends Iterable<unknown> | AsyncIterable<unknown>
->(a: A, b: B): ReturnConcatType<A, B>;
+>(iterable1: A, iterable2: B): ReturnConcatType<A, B>;
 
 function concat<
   A extends Iterable<unknown> | AsyncIterable<unknown>,
   B extends Iterable<unknown> | AsyncIterable<unknown>,
->(a: A): (b: B) => ReturnConcatType<A, B>;
+>(iterable1: A): (iterable2: B) => ReturnConcatType<A, B>;
 
 function concat<
   A extends Iterable<unknown> | AsyncIterable<unknown>,
   B extends Iterable<unknown> | AsyncIterable<unknown>,
 >(
-  a: A,
-  b?: B,
+  iterable1: A,
+  iterable2?: B,
 ):
   | IterableIterator<IterableInfer<A> | IterableInfer<B>>
   | AsyncIterableIterator<IterableInfer<A> | IterableInfer<B>>
-  | ((b: B) => ReturnConcatType<A, B>) {
-  if (b === undefined) {
-    return (b: B): ReturnConcatType<A, B> => {
-      return concat(a, b) as ReturnConcatType<A, B>;
+  | ((iterable2: B) => ReturnConcatType<A, B>) {
+  if (iterable2 === undefined) {
+    return (iterable2: B): ReturnConcatType<A, B> => {
+      return concat(iterable1, iterable2) as ReturnConcatType<A, B>;
     };
   }
 
-  if (isAsyncIterable(a) || isAsyncIterable(b)) {
+  if (isAsyncIterable(iterable1) || isAsyncIterable(iterable2)) {
     // prettier-ignore
-    return async(toAsyncIterable(a), toAsyncIterable(b)) as ReturnConcatType<A, B>;
+    return async(toAsyncIterable(iterable1), toAsyncIterable(iterable2)) as ReturnConcatType<A, B>;
   }
 
-  if (isIterable(a) && isIterable(b)) {
-    return sync(a, b) as ReturnConcatType<A, B>;
+  if (isIterable(iterable1) && isIterable(iterable2)) {
+    return sync(iterable1, iterable2) as ReturnConcatType<A, B>;
   }
 
-  throw new TypeError("a,b must be type of Iterable or AsyncIterable");
+  throw new TypeError(
+    "'iterable1','iterable2' must be type of Iterable or AsyncIterable",
+  );
 }
 
 export default concat;
diff --git a/src/Lazy/concurrent.ts b/src/Lazy/concurrent.ts
index bd0ba476..ec9ee66a 100644
--- a/src/Lazy/concurrent.ts
+++ b/src/Lazy/concurrent.ts
@@ -86,15 +86,15 @@ function concurrent<A>(
   }
 
   if (length === Infinity) {
-    throw new TypeError("concurrent: length cannot be infinite");
+    throw new TypeError("'length' cannot be infinite");
   }
 
   if (length <= 0) {
-    throw new TypeError("concurrent: length must be over '0'");
+    throw new TypeError("'length' must be over 0");
   }
 
   if (!isAsyncIterable(iterable)) {
-    throw new TypeError("concurrent: iterable must be AsyncIterable");
+    throw new TypeError("'iterable' must be type of AsyncIterable");
   }
 
   const iterator = iterable[Symbol.asyncIterator]();
diff --git a/src/Lazy/drop.ts b/src/Lazy/drop.ts
index 819d66b7..de850cf0 100644
--- a/src/Lazy/drop.ts
+++ b/src/Lazy/drop.ts
@@ -122,7 +122,7 @@ function drop<A extends Iterable<unknown> | AsyncIterable<unknown>>(
   }
 
   if (length < 1) {
-    throw new TypeError("length must be greater than 1");
+    throw new TypeError("'length' must be greater than 1");
   }
 
   if (isIterable(iterable)) {
@@ -133,7 +133,7 @@ function drop<A extends Iterable<unknown> | AsyncIterable<unknown>>(
     return async(length, iterable) as AsyncIterableIterator<A>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default drop;
diff --git a/src/Lazy/dropUntil.ts b/src/Lazy/dropUntil.ts
index 5c12d08e..b383d9a1 100644
--- a/src/Lazy/dropUntil.ts
+++ b/src/Lazy/dropUntil.ts
@@ -144,7 +144,7 @@ function dropUntil<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable as AsyncIterable<IterableInfer<A>>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default dropUntil;
diff --git a/src/Lazy/dropWhile.ts b/src/Lazy/dropWhile.ts
index c5806a38..d056baaa 100644
--- a/src/Lazy/dropWhile.ts
+++ b/src/Lazy/dropWhile.ts
@@ -147,7 +147,7 @@ function dropWhile<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable as AsyncIterable<IterableInfer<A>>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default dropWhile;
diff --git a/src/Lazy/filter.ts b/src/Lazy/filter.ts
index d549f40b..ba10ea3c 100644
--- a/src/Lazy/filter.ts
+++ b/src/Lazy/filter.ts
@@ -294,7 +294,7 @@ function filter<
     return async(f, iterable as AsyncIterable<IterableInfer<A>>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default filter;
diff --git a/src/Lazy/flat.ts b/src/Lazy/flat.ts
index fb10c9c8..ef879bb3 100644
--- a/src/Lazy/flat.ts
+++ b/src/Lazy/flat.ts
@@ -235,7 +235,7 @@ function flat<A extends Iterable<unknown> | AsyncIterable<unknown>>(
     return async(iterable, depth);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default flat;
diff --git a/src/Lazy/flatMap.ts b/src/Lazy/flatMap.ts
index 0ea2ef69..eac32182 100644
--- a/src/Lazy/flatMap.ts
+++ b/src/Lazy/flatMap.ts
@@ -101,7 +101,7 @@ function flatMap<
     return flat(map(f, iterable as AsyncIterable<Awaited<IterableInfer<A>>>));
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default flatMap;
diff --git a/src/Lazy/index.ts b/src/Lazy/index.ts
index 1071ec26..2bc3fff9 100644
--- a/src/Lazy/index.ts
+++ b/src/Lazy/index.ts
@@ -11,7 +11,6 @@ import flat from "./flat";
 import flatMap from "./flatMap";
 import map from "./map";
 import peek from "./peek";
-import pluck from "./pluck";
 import prepend from "./prepend";
 import range from "./range";
 import reject from "./reject";
@@ -39,7 +38,6 @@ export {
   flatMap,
   map,
   peek,
-  pluck,
   prepend,
   range,
   reject,
diff --git a/src/Lazy/map.ts b/src/Lazy/map.ts
index 4d2da90e..d201018b 100644
--- a/src/Lazy/map.ts
+++ b/src/Lazy/map.ts
@@ -140,7 +140,7 @@ function map<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable as AsyncIterable<IterableInfer<A>>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default map;
diff --git a/src/Lazy/peek.ts b/src/Lazy/peek.ts
index c499a96e..ca15304f 100644
--- a/src/Lazy/peek.ts
+++ b/src/Lazy/peek.ts
@@ -93,7 +93,7 @@ function peek<T extends Iterable<unknown> | AsyncIterable<unknown>>(
     ) as ReturnIterableIteratorType<T, IterableInfer<T>>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default peek;
diff --git a/src/Lazy/pluck.ts b/src/Lazy/pluck.ts
deleted file mode 100644
index 8c0831a5..00000000
--- a/src/Lazy/pluck.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { map } from ".";
-import { isAsyncIterable, isIterable } from "../_internal/utils";
-
-/**
- * Returns Iterable/AsyncIterable by plucking the same named property off all objects in Iterable/AsyncIterable supplied.
- *
- * @example
- * ```ts
- * const iter = pluck('age', [{age:21}, {age:22}, {age:23}]);
- * iter.next(); // {done:false, value: 21}
- * iter.next(); // {done:false, value: 22}
- * iter.next(); // {done:false, value: 23}
- *
- * // with pipe
- * pipe(
- *  [{age:21}, {age:22}, {age:23}],
- *  pluck('age'),
- *  toArray,
- * ); // [21, 22 ,23]
- *
- * // if you want to use asynchronous callback
- * await pipe(
- *  Promise.resolve([{age:21}, {age:22}, {age:23}]),
- *  toAsync,
- *  pluck('age'),
- *  toArray,
- * ); // [21, 22 ,23]
- *
- * // with toAsync
- * await pipe(
- *  [Promise.resolve({age:21}), Promise.resolve({age:22}), Promise.resolve({age:23})],
- *  toAsync,
- *  pluck('age'),
- *  toArray,
- * ); // [21, 22 ,23]
- * ```
- * see {@link https://fxts.dev/docs/pipe | pipe}, {@link https://fxts.dev/docs/toAsync | toAsync},
- * {@link https://fxts.dev/docs/toArray | toArray}
- */
-function pluck<O extends object, K extends keyof O>(
-  key: K,
-  iterable: Iterable<O>,
-): IterableIterator<O[K]>;
-
-function pluck<O extends object, K extends keyof O>(
-  key: K,
-  iterable: AsyncIterable<O>,
-): AsyncIterableIterator<O[K]>;
-
-function pluck<O extends object, K extends keyof O>(
-  key: K,
-): (iterable: Iterable<O>) => IterableIterator<O[K]>;
-
-function pluck<O extends object, K extends keyof O>(
-  key: K,
-): (iterable: AsyncIterable<O>) => AsyncIterableIterator<O[K]>;
-
-function pluck<O extends object, K extends keyof O>(
-  key: K,
-  iterable?: Iterable<O> | AsyncIterable<O>,
-):
-  | IterableIterator<O[K]>
-  | AsyncIterableIterator<O[K]>
-  | ((iterable: Iterable<O>) => IterableIterator<O[K]>)
-  | ((iterable: AsyncIterable<O>) => AsyncIterableIterator<O[K]>) {
-  if (iterable === undefined) {
-    return (iterable: any): any => {
-      return pluck(key, iterable) as
-        | IterableIterator<O[K]>
-        | AsyncIterableIterator<O[K]>;
-    };
-  }
-
-  if (isIterable(iterable)) {
-    return map((a) => a[key], iterable);
-  }
-
-  if (isAsyncIterable(iterable)) {
-    return map((a) => a[key], iterable);
-  }
-
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
-}
-
-export default pluck;
diff --git a/src/Lazy/prepend.ts b/src/Lazy/prepend.ts
index 327fc479..e161e15d 100644
--- a/src/Lazy/prepend.ts
+++ b/src/Lazy/prepend.ts
@@ -97,7 +97,7 @@ function prepend<A, B extends Iterable<A> | AsyncIterable<Awaited<A>>>(
     return sync(a, iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default prepend;
diff --git a/src/Lazy/reject.ts b/src/Lazy/reject.ts
index 507964b7..5aa1d730 100644
--- a/src/Lazy/reject.ts
+++ b/src/Lazy/reject.ts
@@ -104,7 +104,7 @@ function reject<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default reject;
diff --git a/src/Lazy/split.ts b/src/Lazy/split.ts
index 907442df..b1cb10de 100644
--- a/src/Lazy/split.ts
+++ b/src/Lazy/split.ts
@@ -107,7 +107,7 @@ function split<A extends Iterable<string> | AsyncIterable<string>>(
     return async(sep, iterable as AsyncIterable<string>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default split;
diff --git a/src/Lazy/take.ts b/src/Lazy/take.ts
index 2ba53408..21b8ed35 100644
--- a/src/Lazy/take.ts
+++ b/src/Lazy/take.ts
@@ -100,7 +100,7 @@ function take<A extends Iterable<unknown> | AsyncIterable<unknown>>(
     return async(l, iterable) as AsyncIterableIterator<IterableInfer<A>>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default take;
diff --git a/src/Lazy/takeUntil.ts b/src/Lazy/takeUntil.ts
index 678c07ce..834848f6 100644
--- a/src/Lazy/takeUntil.ts
+++ b/src/Lazy/takeUntil.ts
@@ -150,7 +150,7 @@ function takeUntil<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable) as AsyncIterableIterator<IterableInfer<A>>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default takeUntil;
diff --git a/src/Lazy/takeWhile.ts b/src/Lazy/takeWhile.ts
index 5cc9a05e..b8358013 100644
--- a/src/Lazy/takeWhile.ts
+++ b/src/Lazy/takeWhile.ts
@@ -146,7 +146,7 @@ function takeWhile<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable) as AsyncIterableIterator<IterableInfer<A>>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default takeWhile;
diff --git a/src/Lazy/uniq.ts b/src/Lazy/uniq.ts
index 80162712..687f3393 100644
--- a/src/Lazy/uniq.ts
+++ b/src/Lazy/uniq.ts
@@ -53,7 +53,7 @@ function uniq<A extends Iterable<unknown> | AsyncIterable<unknown>>(
     return uniqueBy(identity, iterable) as ReturnIterableIteratorType<A>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default uniq;
diff --git a/src/Lazy/uniqBy.ts b/src/Lazy/uniqBy.ts
index ad8740e8..c7b75bcc 100644
--- a/src/Lazy/uniqBy.ts
+++ b/src/Lazy/uniqBy.ts
@@ -104,7 +104,7 @@ function uniqBy<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     ) as AsyncIterableIterator<A>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default uniqBy;
diff --git a/src/Lazy/zip.ts b/src/Lazy/zip.ts
index b8e6a308..783459ff 100644
--- a/src/Lazy/zip.ts
+++ b/src/Lazy/zip.ts
@@ -112,7 +112,7 @@ function zip<TS extends UniversalIterable[]>(
   }
 
   if (iterables.some((a) => !isIterable(a) && !isAsyncIterable(a))) {
-    throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+    throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
   }
 
   const hasAsyncIterable = iterables.some((iterable) =>
diff --git a/src/Lazy/zipWithIndex.ts b/src/Lazy/zipWithIndex.ts
index 17001c02..aeb47d43 100644
--- a/src/Lazy/zipWithIndex.ts
+++ b/src/Lazy/zipWithIndex.ts
@@ -81,7 +81,7 @@ function zipWithIndex<T>(
     return _zipWithIndex(iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default zipWithIndex;
diff --git a/src/countBy.ts b/src/countBy.ts
index f37755d0..7392310c 100644
--- a/src/countBy.ts
+++ b/src/countBy.ts
@@ -99,7 +99,7 @@ function countBy<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default countBy;
diff --git a/src/each.ts b/src/each.ts
index 444ef059..5b27540d 100644
--- a/src/each.ts
+++ b/src/each.ts
@@ -64,7 +64,7 @@ function each<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, iterable as AsyncIterable<IterableInfer<A>>);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default each;
diff --git a/src/every.ts b/src/every.ts
index 9e59d202..fa9e381e 100644
--- a/src/every.ts
+++ b/src/every.ts
@@ -72,7 +72,7 @@ function every<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default every;
diff --git a/src/find.ts b/src/find.ts
index 2e36b6da..c59ca452 100644
--- a/src/find.ts
+++ b/src/find.ts
@@ -51,7 +51,7 @@ function find<T extends Iterable<unknown> | AsyncIterable<unknown>>(
   if (isAsyncIterable(iterable)) {
     return head(filter(f, iterable as AsyncIterable<IterableInfer<T>>));
   }
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default find;
diff --git a/src/groupBy.ts b/src/groupBy.ts
index 8d5e5980..e82a2bd3 100644
--- a/src/groupBy.ts
+++ b/src/groupBy.ts
@@ -99,7 +99,7 @@ function groupBy<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default groupBy;
diff --git a/src/head.ts b/src/head.ts
index dde0c6b3..5b88ec69 100644
--- a/src/head.ts
+++ b/src/head.ts
@@ -55,7 +55,7 @@ function head<A>(iterable: Iterable<A> | AsyncIterable<A>) {
     return pipe(take(1, iterable), toArray, ([a]) => a);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default head;
diff --git a/src/index.ts b/src/index.ts
index f0f62157..07424ef7 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -12,9 +12,7 @@ import isString from "./isString";
 import join from "./join";
 import last from "./last";
 import not from "./not";
-import omit from "./omit";
 import partition from "./partition";
-import pick from "./pick";
 import pipe from "./pipe";
 import pipe1 from "./pipe1";
 import reduce from "./reduce";
@@ -38,9 +36,7 @@ export {
   join,
   last,
   not,
-  omit,
   partition,
-  pick,
   pipe,
   pipe1,
   reduce,
diff --git a/src/indexBy.ts b/src/indexBy.ts
index 7cb787e2..64ccbe01 100644
--- a/src/indexBy.ts
+++ b/src/indexBy.ts
@@ -92,7 +92,7 @@ function indexBy<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default indexBy;
diff --git a/src/join.ts b/src/join.ts
index 36561ee3..226aeb03 100644
--- a/src/join.ts
+++ b/src/join.ts
@@ -74,7 +74,7 @@ function join<A extends Iterable<unknown> | AsyncIterable<unknown>>(
     return async(sep, iterable) as Promise<string>;
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default join;
diff --git a/src/last.ts b/src/last.ts
index 57bdb071..c37209db 100644
--- a/src/last.ts
+++ b/src/last.ts
@@ -57,7 +57,7 @@ function last<A>(iterable: Iterable<A> | AsyncIterable<A>) {
     return reduce((_, a) => a, iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default last;
diff --git a/src/omit.ts b/src/omit.ts
deleted file mode 100644
index d28163c2..00000000
--- a/src/omit.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-import IterableInfer from "./types/IterableInfer";
-import { isAsyncIterable, isIterable } from "./_internal/utils";
-import toArray from "./toArray";
-
-function inner<T>(obj: T, keys: Set<keyof T>) {
-  return Object.fromEntries(
-    Object.entries(obj).filter(([k]) => !keys.has(k as keyof T)),
-  );
-}
-
-function sync<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Omit<T, IterableInfer<U>> {
-  const keys = new Set(iterable);
-  return inner(obj, keys) as Omit<T, IterableInfer<U>>;
-}
-
-async function async<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Promise<Omit<T, IterableInfer<U>>> {
-  const keys = new Set(await toArray(iterable));
-  return inner(obj, keys) as Omit<T, IterableInfer<U>>;
-}
-
-/**
- * omit
- *
- * Returns a partial copy of an object omitting the keys specified.
- *
- * @example
- * ```ts
- * const person = {
- *   name: "james",
- *   age: 40,
- *   numberOfKids: 2,
- *   team: "Software Development",
- *   preferredLanguage: "Rust",
- * };
- *
- * const dad = omit(["team", "preferredLanguage"], person);
- * // { name: "james", age: 40, numberOfKids: 2 }
- *
- * const developer = omit(["age", "numberOfKids"], person);
- * // { name: "james", team: "Software Development", preferredLanguage: "Rust" }
- *
- * // with pipe
- * pipe(
- *  person,
- *  omit(["team", "preferredLanguage"]),
- * );
- *
- * // if you want to use AsyncIterable as the list of property names
- * const anonymous = await omit(toAsync(["name"] as const), person);
- * ```
- * see {@link https://fxts.dev/docs/pipe | pipe}, {@link https://fxts.dev/docs/toAsync | toAsync},
- * {@link https://fxts.dev/docs/pick | pick},
- */
-
-function omit<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Omit<T, IterableInfer<U>>;
-
-function omit<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Promise<Omit<T, IterableInfer<U>>>;
-
-function omit<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-): (obj: T) => Omit<T, IterableInfer<U>>;
-
-function omit<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-): (obj: T) => Promise<Omit<T, IterableInfer<U>>>;
-
-function omit<
-  T extends object,
-  U extends AsyncIterable<keyof T> | Iterable<keyof T>,
->(
-  iterable: U,
-  obj?: T,
-):
-  | Promise<Omit<T, IterableInfer<U>>>
-  | Omit<T, IterableInfer<U>>
-  | ((
-      obj: T,
-    ) => Promise<Omit<T, IterableInfer<U>>> | Omit<T, IterableInfer<U>>) {
-  if (obj === undefined) {
-    return (obj: T) => omit(iterable as any, obj) as any;
-  }
-  if (isIterable(iterable)) {
-    return sync(iterable, obj) as Omit<T, IterableInfer<U>>;
-  } else if (isAsyncIterable(iterable)) {
-    return async(iterable, obj) as Promise<Omit<T, IterableInfer<U>>>;
-  }
-  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
-}
-
-export default omit;
diff --git a/src/partition.ts b/src/partition.ts
index b69c2c4c..28169f52 100644
--- a/src/partition.ts
+++ b/src/partition.ts
@@ -85,7 +85,7 @@ function partition<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return group.then((group) => [group["true"] || [], group["false"] || []]);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default partition;
diff --git a/src/pick.ts b/src/pick.ts
deleted file mode 100644
index cad24631..00000000
--- a/src/pick.ts
+++ /dev/null
@@ -1,107 +0,0 @@
-import IterableInfer from "./types/IterableInfer";
-import { isAsyncIterable, isIterable } from "./_internal/utils";
-import toArray from "./toArray";
-
-function inner<T>(obj: T, keys: Set<keyof T>) {
-  return Object.fromEntries(
-    Object.entries(obj).filter(([k]) => keys.has(k as keyof T)),
-  );
-}
-
-function sync<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Pick<T, IterableInfer<U>> {
-  const keys = new Set(iterable);
-  return inner(obj, keys) as Pick<T, IterableInfer<U>>;
-}
-
-async function async<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Promise<Pick<T, IterableInfer<U>>> {
-  const keys = new Set(await toArray(iterable));
-  return inner(obj, keys) as Pick<T, IterableInfer<U>>;
-}
-
-/**
- * pick
- *
- * Returns a partial copy of an object containing given keys.
- *
- * @example
- * ```ts
- * const person = {
- *   name: "james",
- *   age: 40,
- *   numberOfKids: 2,
- *   team: "Software Development",
- *   preferredLanguage: "Rust",
- * };
- *
- * const dad = pick(["name", "age", "numberOfKids"], person);
- * // { name: "james", age: 40, numberOfKids: 2 }
- *
- * const developer = pick(["name", "team", "preferredLanguage"], person);
- * // { name: "james", team: "Software Development", preferredLanguage: "Rust" }
- *
- * // with pipe
- * pipe(
- *  person,
- *  pick(["name", "age", "numberOfKids"]),
- * );
- *
- * // if you want to use AsyncIterable as the list of property names
- * const anonymousDeveloper = await pick(toAsync(["preferredLanguage"] as const), person);
- * ```
- * see {@link https://fxts.dev/docs/pipe | pipe}, {@link https://fxts.dev/docs/toAsync | toAsync},
- * {@link https://fxts.dev/docs/omit | omit},
- */
-
-function pick<T extends object, U extends readonly []>(
-  iterable: U,
-  obj: T,
-): Record<string, never>;
-
-function pick<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Pick<T, IterableInfer<U>>;
-
-function pick<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-  obj: T,
-): Promise<Pick<T, IterableInfer<U>>>;
-
-function pick<T extends object, U extends Iterable<keyof T>>(
-  iterable: U,
-): (obj: T) => Pick<T, IterableInfer<U>>;
-
-function pick<T extends object, U extends AsyncIterable<keyof T>>(
-  iterable: U,
-): (obj: T) => Promise<Pick<T, IterableInfer<U>>>;
-
-function pick<
-  T extends object,
-  U extends AsyncIterable<keyof T> | Iterable<keyof T>,
->(
-  iterable: U,
-  obj?: T,
-):
-  | Promise<Pick<T, IterableInfer<U>>>
-  | Pick<T, IterableInfer<U>>
-  | ((
-      obj: T,
-    ) => Promise<Pick<T, IterableInfer<U>>> | Pick<T, IterableInfer<U>>) {
-  if (obj === undefined) {
-    return (obj: T) => pick(iterable as any, obj) as any;
-  }
-  if (isIterable(iterable)) {
-    return sync(iterable, obj);
-  } else if (isAsyncIterable(iterable)) {
-    return async(iterable, obj);
-  }
-  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
-}
-
-export default pick;
diff --git a/src/reduce.ts b/src/reduce.ts
index bfdd8051..f3dae1ba 100644
--- a/src/reduce.ts
+++ b/src/reduce.ts
@@ -151,7 +151,7 @@ function reduce<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
       });
     }
 
-    throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+    throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
   }
 
   if (isIterable(iterable)) {
@@ -162,7 +162,7 @@ function reduce<A extends Iterable<unknown> | AsyncIterable<unknown>, B>(
     return async(f, Promise.resolve(seed as B), iterable);
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default reduce;
diff --git a/src/some.ts b/src/some.ts
index f2d4ec78..5d6957a8 100644
--- a/src/some.ts
+++ b/src/some.ts
@@ -92,7 +92,7 @@ function some<
     );
   }
 
-  throw new TypeError("iterable must be type of Iterable or AsyncIterable");
+  throw new TypeError("'iterable' must be type of Iterable or AsyncIterable");
 }
 
 export default some;


Test patch:
diff --git a/test/Lazy/pluck.spec.ts b/test/Lazy/pluck.spec.ts
deleted file mode 100644
index 90d40eee..00000000
--- a/test/Lazy/pluck.spec.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { filter, pipe, toArray, toAsync } from "../../src";
-import pluck from "../../src/Lazy/pluck";
-
-describe("pluck", function () {
-  const given = [
-    { id: 1, age: 21 },
-    { id: 2, age: 22 },
-    { id: 3, age: 23 },
-    { id: 4, age: 24 },
-  ];
-
-  describe("sync", function () {
-    it("should return Iterable by plucking the same named property off all objects in the Iterable supplied", function () {
-      const acc = [];
-      for (const a of pluck("age", given)) {
-        acc.push(a);
-      }
-      expect(acc).toEqual([21, 22, 23, 24]);
-    });
-
-    it("should be able to be used as a curried function in the pipeline", function () {
-      const res = pipe(
-        given,
-        pluck("age"),
-        filter((a) => a > 21),
-        toArray,
-      );
-
-      expect(res).toEqual([22, 23, 24]);
-    });
-  });
-
-  describe("async", function () {
-    it("should return Iterable by plucking the same named property off all objects in the Iterable supplied", async function () {
-      const acc = [];
-      for await (const a of pluck("age", toAsync(given))) {
-        acc.push(a);
-      }
-      expect(acc).toEqual([21, 22, 23, 24]);
-    });
-
-    it("should be able to be used as a curried function in the pipeline", async function () {
-      const res = await pipe(
-        toAsync(given),
-        pluck("age"),
-        filter((a) => a > 21),
-        toArray,
-      );
-
-      expect(res).toEqual([22, 23, 24]);
-    });
-  });
-});
diff --git a/test/omit.spec.ts b/test/omit.spec.ts
deleted file mode 100644
index c019401f..00000000
--- a/test/omit.spec.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { omit, pipe, toAsync } from "../src/index";
-
-describe("omit", function () {
-  describe("sync", function () {
-    it("should be omitted properties as given keys", function () {
-      const obj = { a: 1, b: 2, c: "3" };
-      expect(omit(["a", "c"], obj)).toEqual({ b: 2 });
-    });
-    it("should be able to be used as a curried function in the pipeline", function () {
-      const res = pipe(
-        { a: 1, b: "2", c: true },
-        omit(["a", "b"]),
-        Object.entries,
-      );
-      expect(res).toEqual([["c", true]]);
-    });
-  });
-
-  describe("async", function () {
-    it("should be omitted properties as given keys", async function () {
-      const obj = { a: 1, b: 2, c: "3" };
-      const iter = toAsync(["a", "c"] as const);
-      const res = await omit(iter, obj);
-      expect(res).toEqual({ b: 2 });
-    });
-    it("should be able to be used as a curried function in the pipeline", async function () {
-      const res = await pipe(
-        { a: 1, b: "2", c: true },
-        omit(toAsync(["a", "b"] as const)),
-        Object.entries,
-      );
-      expect(res).toEqual([["c", true]]);
-    });
-  });
-});
diff --git a/test/pick.spec.ts b/test/pick.spec.ts
deleted file mode 100644
index 64e7cdb0..00000000
--- a/test/pick.spec.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { pick, pipe, toAsync } from "../src/index";
-
-describe("pick", function () {
-  describe("sync", function () {
-    it("should be picked properties as given keys", function () {
-      const obj = { a: 1, b: 2, c: "3" };
-      expect(pick(["a", "c"], obj)).toEqual({ a: 1, c: "3" });
-    });
-    it("should be able to be used as a curried function in the pipeline", function () {
-      const res = pipe(
-        { a: 1, b: "2", c: true },
-        pick(["a", "b"]),
-        Object.entries,
-      );
-      expect(res).toEqual([
-        ["a", 1],
-        ["b", "2"],
-      ]);
-    });
-  });
-
-  describe("async", function () {
-    it("should be picked properties as given keys", async function () {
-      const obj = { a: 1, b: 2, c: "3" };
-      const iter = toAsync(["a", "c"] as const);
-      const res = await pick(iter, obj);
-      expect(res).toEqual({ a: 1, c: "3" });
-    });
-    it("should be able to be used as a curried function in the pipeline", async function () {
-      const res = await pipe(
-        { a: 1, b: "2", c: true },
-        pick(toAsync(["a", "b"] as const)),
-        Object.entries,
-      );
-      expect(res).toEqual([
-        ["a", 1],
-        ["b", "2"],
-      ]);
-    });
-  });
-});
diff --git a/type-check/Lazy/pluck.test.ts b/type-check/Lazy/pluck.test.ts
deleted file mode 100644
index 9bc3082a..00000000
--- a/type-check/Lazy/pluck.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as Test from "../../src/types/Test";
-import { pluck, toAsync, pipe } from "../../src";
-
-const { checks, check } = Test;
-const given = [
-  { id: 1, age: 21 },
-  { id: 2, age: 22 },
-  { id: 3, age: 23 },
-  { id: 4, age: 24 },
-];
-
-const res1 = pluck("age", given);
-const res2 = pluck("age", toAsync(given));
-
-const res3 = pipe(given, pluck("age"));
-const res5 = pipe(toAsync(given), pluck("age"));
-
-checks([
-  check<typeof res1, IterableIterator<number>, Test.Pass>(),
-  check<typeof res2, AsyncIterableIterator<number>, Test.Pass>(),
-
-  check<typeof res3, IterableIterator<number>, Test.Pass>(),
-  check<typeof res5, AsyncIterableIterator<number>, Test.Pass>(),
-]);
diff --git a/type-check/omit.test.ts b/type-check/omit.test.ts
deleted file mode 100644
index 2283f122..00000000
--- a/type-check/omit.test.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as Test from "../src/types/Test";
-import { omit, toAsync } from "../src";
-
-const { checks, check } = Test;
-
-const obj1 = {
-  a: 1,
-  b: "2",
-  c: true,
-  d: Symbol("d"),
-};
-
-type OptionalObj = {
-  a: number;
-  b?: string;
-};
-
-const res1 = omit([], obj1);
-const res2 = omit(["a", "b"], obj1);
-const res3 = omit(["a", "c"], obj1);
-const res4 = omit(toAsync(["a", "c"] as const), obj1);
-const res5 = omit(["a"], { a: 1 } as OptionalObj);
-
-checks([
-  check<typeof res1, typeof obj1, Test.Pass>(),
-  check<typeof res2, { c: boolean; d: symbol }, Test.Pass>(),
-  check<typeof res3, { b: string; d: symbol }, Test.Pass>(),
-  check<typeof res4, Promise<{ b: string; d: symbol }>, Test.Pass>(),
-  check<typeof res5, { b?: string }, Test.Pass>(),
-]);
diff --git a/type-check/pick.test.ts b/type-check/pick.test.ts
deleted file mode 100644
index d024b827..00000000
--- a/type-check/pick.test.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as Test from "../src/types/Test";
-import { pick, toAsync } from "../src";
-
-const { checks, check } = Test;
-
-const obj1 = {
-  a: 1,
-  b: "2",
-  c: true,
-  d: Symbol("d"),
-};
-
-type OptionalObj = {
-  a: number;
-  b?: string;
-};
-
-const res1 = pick([], obj1);
-const res2 = pick(["a", "b", "d"], obj1);
-const res3 = pick(["a", "c"], obj1);
-const res4 = pick(toAsync(["a", "b"] as const), obj1);
-const res5 = pick(["a", "b"], { a: 1 } as OptionalObj);
-
-checks([
-  check<typeof res1, Record<string, never>, Test.Pass>(),
-  check<typeof res2, { a: number; b: string; d: symbol }, Test.Pass>(),
-  check<typeof res3, { a: number; c: boolean }, Test.Pass>(),
-  check<typeof res4, Promise<{ a: number; b: string }>, Test.Pass>(),
-  check<typeof res5, { a: number; b?: string }, Test.Pass>(),
-]);