iterable-linq-utility 0.0.16 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +72 -0
  2. package/dist/index.d.cts +875 -0
  3. package/dist/index.d.ts +875 -14
  4. package/dist/iterable-linq-utility.js +641 -0
  5. package/dist/iterable-linq-utility.umd.cjs +1 -0
  6. package/package.json +42 -24
  7. package/dist/collections/index.d.ts +0 -2
  8. package/dist/collections/linkedList.d.ts +0 -24
  9. package/dist/functions/collectToArray.d.ts +0 -1
  10. package/dist/functions/empty.d.ts +0 -1
  11. package/dist/functions/filter.d.ts +0 -9
  12. package/dist/functions/flatMap.d.ts +0 -8
  13. package/dist/functions/forEach.d.ts +0 -3
  14. package/dist/functions/index.d.ts +0 -23
  15. package/dist/functions/map.d.ts +0 -9
  16. package/dist/functions/materialize.d.ts +0 -7
  17. package/dist/functions/max.d.ts +0 -9
  18. package/dist/functions/memoize.d.ts +0 -11
  19. package/dist/functions/min.d.ts +0 -9
  20. package/dist/functions/range.d.ts +0 -7
  21. package/dist/functions/reduce.d.ts +0 -10
  22. package/dist/functions/repeat.d.ts +0 -1
  23. package/dist/functions/some.d.ts +0 -9
  24. package/dist/functions/tap.d.ts +0 -9
  25. package/dist/functions/tapChain.d.ts +0 -9
  26. package/dist/interable-linq-utility.js +0 -708
  27. package/dist/interable-linq-utility.umd.cjs +0 -1
  28. package/dist/linqIterable.d.ts +0 -45
  29. package/dist/types/action.d.ts +0 -3
  30. package/dist/types/comparer.d.ts +0 -4
  31. package/dist/types/index.d.ts +0 -7
  32. package/dist/types/mapper.d.ts +0 -1
  33. package/dist/types/predicate.d.ts +0 -1
  34. package/dist/types/reducer.d.ts +0 -1
  35. package/dist/types/tapper.d.ts +0 -2
  36. package/dist/types/unit.d.ts +0 -3
  37. package/dist/utils/index.d.ts +0 -4
  38. package/dist/utils/iteratorResults.d.ts +0 -4
  39. package/dist/utils/utils.d.ts +0 -56
  40. package/dist/utils/validations.d.ts +0 -5
@@ -1 +0,0 @@
1
- (function(h,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(h=typeof globalThis<"u"?globalThis:h||self,c(h["interable-linq-utility"]={}))})(this,function(h){"use strict";var Nt=Object.defineProperty;var St=(h,c,o)=>c in h?Nt(h,c,{enumerable:!0,configurable:!0,writable:!0,value:o}):h[c]=o;var n=(h,c,o)=>(St(h,typeof c!="symbol"?c+"":c,o),o);function c(e){return{done:!1,value:e}}function o(e){return{done:!0,value:e}}function zt(e){return e}function d(e){return typeof e=="function"}function I(e){if(e==null)throw new Error('The "sourceIterable" must be provided');if(!d(e[Symbol.iterator]))throw new Error('The provided "soureIterable" does not conform to the iterator protocol https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol. It must implement the "[Symbol.iterator]" function.')}function K(e){if(!d(e))throw new Error('The "predicate" function must be provided')}function Q(e){if(!d(e))throw new Error('The "mapper" function must be provided')}function X(e){return I(e),Array.from(e)}function S(){return new Y}class Y{[Symbol.iterator](){return new Z}}class Z{next(){return o()}return(t){return o(t)}throw(){return o()}}function z(e,t){return I(e),K(t),new _(e,t)}class _{constructor(t,r){n(this,"predicate");n(this,"source");this.source=t,this.predicate=r}[Symbol.iterator](){return new q(this.source,this.predicate)}}class q{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"predicate");n(this,"internalNext",()=>{for(;;){const t=this.sourceIterator.next();if(t.done===!0||this.predicate(t.value,this.index++))return t}});this.sourceIterator=t[Symbol.iterator](),this.predicate=r}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}function M(e,t){return I(e),Q(t),new W(e,t)}class W{constructor(t,r){n(this,"mapper");n(this,"source");this.source=t,this.mapper=r}[Symbol.iterator](){return new tt(this.source,this.mapper)}}class tt{constructor(t,r){n(this,"index",0);n(this,"mapper");n(this,"sourceIterator");n(this,"fmIterator");n(this,"sourceNext",()=>{const t=this.sourceIterator.next();if(t.done!==!0){const r=this.mapper(t.value,this.index++);return this.fmIterator=r[Symbol.iterator](),this.internalNext=this.fmNext,this.internalNext()}return this.internalNext=o,this.internalNext()});n(this,"fmNext",()=>{const t=this.fmIterator.next();return t.done!==!0?c(t.value):(this.internalNext=this.sourceNext,this.internalNext())});n(this,"internalNext",this.sourceNext);this.sourceIterator=t[Symbol.iterator](),this.mapper=r}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}class g{}const T=new g;Object.freeze(T);function x(){return T}function A(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"action" function must be provided';const r=e[Symbol.iterator]();for(let i=r.next(),s=0;i.done!==!0;i=r.next(),s++)t(i.value,s);return x()}async function k(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"action" function must be provided';const r=[],i=e[Symbol.iterator]();for(let s=i.next(),a=0;s.done!==!0;s=i.next(),a++)r.push(t(s.value,a));return await Promise.all(r),x()}function L(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"mapper" function must be provided';return new et(e,t)}class et{constructor(t,r){n(this,"mapper");n(this,"source");this.source=t,this.mapper=r}[Symbol.iterator](){return new rt(this.source,this.mapper)}}class rt{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"mapper");n(this,"internalNext",()=>{const t=this.sourceIterator.next();return t.done!==!0?c(this.mapper(t.value,this.index++)):(this.internalNext=o,this.internalNext())});this.sourceIterator=t[Symbol.iterator](),this.mapper=r}next(){return this.internalNext()}return(t){return this.internalNext=o,d(this.sourceIterator.return)&&this.sourceIterator.return(t),o(t)}}function R(e){if(e==null)throw'The source "iterable" must be provided';const t=e[Symbol.iterator](),r=new w;for(let i=t.next();i.done!==!0;i=t.next())r.addLast(i.value);return r}class w{constructor(){n(this,"internalSize",0);n(this,"head",null);n(this,"tail",null);n(this,"internalAddFirst",t=>{const r={data:t,nextNode:null};return this.head=r,this.tail=r,this.internalSize++,this.internalAddFirst=i=>{const s={data:i,nextNode:null};return s.nextNode=this.head,this.head=s,this.internalSize++,this},this});n(this,"internalAddLast",t=>{const r={data:t,nextNode:null};return this.head=r,this.tail=r,this.internalSize++,this.internalAddLast=i=>{const s={data:i,nextNode:null};return this.tail.nextNode=s,this.tail=s,this.internalSize++,this},this})}[Symbol.iterator](){return new nt(this.head||null)}addFirst(t){return this.internalAddFirst(t)}addLast(t){return this.internalAddLast(t)}size(){return this.internalSize}}class nt{constructor(t){n(this,"current");n(this,"innerNext",()=>{const t=this.current;return t===null?o():(this.current=t.nextNode,c(t.data))});this.current=t}next(){return this.innerNext()}return(t){return this.innerNext=o,o(t)}}function E(e){if(e==null)throw'The source "iterable" must be provided';return e instanceof P?e:new P(e)}class P{constructor(t){n(this,"source");this.source=R(t)}[Symbol.iterator](){return new it(this.source)}}class it{constructor(t){n(this,"sourceIterator");this.sourceIterator=t[Symbol.iterator]()}next(){return this.sourceIterator.next()}}function F(e,t){if(e==null)throw'The source "iterable" must be provided';const r=e[Symbol.iterator]();let i=r.next(),s=i.value,a=null;for(t==null?a=(u,l)=>u<l?-1:u===l?0:1:d(t)?a=t:Array.isArray(t)?a=(u,l)=>{let m=0;for(const f of t)if(m=u[f]<l[f]?-1:u[f]===l[f]?0:1,m!==0)break;return m}:a=(u,l)=>u[t]<l[t]?-1:u[t]===l[t]?0:1,i=r.next();i.done!==!0;i=r.next()){const u=a(s,i.value);s=u>0||u===0?s:i.value}return s??null}function V(){return{allowPartialMemoization:!0}}function j(e,t){if(e==null)throw'The source "iterable" must be provided';const i={...V(),...t}.allowPartialMemoization;return e instanceof v?i?e.changePartialMemoizationBehaviour():e:e instanceof y?i?e:e.changePartialMemoizationBehaviour():i?new y(e):new v(e)}class v{constructor(t){n(this,"source");n(this,"isMemoized",!1);n(this,"memoized",new w);this.source=t}[Symbol.iterator](){return this.isMemoized?new B(this.memoized):new ot(this.source,t=>(this.memoized=t,this.isMemoized=!0,x()))}changePartialMemoizationBehaviour(){return new y(this.source)}}class y{constructor(t){n(this,"isMemoized",!1);n(this,"isMemoizationStarted",!1);n(this,"sourceIterator");n(this,"linkedList",new w);n(this,"source");this.source=t}[Symbol.iterator](){return this.isMemoizationStarted||(this.sourceIterator=this.source[Symbol.iterator](),this.isMemoizationStarted=!0),this.isMemoized?new B(this.linkedList):new st(this.sourceIterator,this.linkedList,t=>this.isMemoized=t.done===!0)}changePartialMemoizationBehaviour(){return new v(this.source)}}class ot{constructor(t,r){n(this,"linkedListIterator");n(this,"setAsMemoized");n(this,"sourceIterable");n(this,"internalNext",()=>{const t=R(this.sourceIterable);return this.setAsMemoized(t),this.linkedListIterator=t[Symbol.iterator](),this.internalNext=()=>this.linkedListIterator.next(),this.internalNext()});this.sourceIterable=t,this.setAsMemoized=r}next(){return this.internalNext()}return(t){this.internalNext=o;const r=this.linkedListIterator;if(r==null)return o(t);if(d(r.return)){const i=r.return(t);return this.linkedListIterator=null,i}return o(t)}}class st{constructor(t,r,i){n(this,"index",0);n(this,"linkedList");n(this,"linkedListIterator");n(this,"setAsMemoized");n(this,"sourceIterator");n(this,"internalNext");this.linkedList=r,this.linkedListIterator=r[Symbol.iterator](),this.setAsMemoized=i,this.sourceIterator=t,this.internalNext=()=>{if(this.linkedList.size()>this.index++)return this.linkedListIterator.next();const s=this.sourceIterator.next();return this.setAsMemoized(s)||this.linkedList.addLast(s.value),s}}next(){return this.internalNext()}return(t){return this.internalNext=o,this.linkedList=null,this.linkedListIterator=null,this.internalNext=o,d(this.sourceIterator.return)?this.sourceIterator.return(t):o(t)}}class B{constructor(t){n(this,"memoizedSourceIterator");this.memoizedSourceIterator=t[Symbol.iterator]()}next(){return this.memoizedSourceIterator.next()}return(t){return this.memoizedSourceIterator.return(t)}}function C(e,t){if(e==null)throw'The source "iterable" must be provided';const r=e[Symbol.iterator]();let i=r.next(),s=i.value,a=null;for(t==null?a=(u,l)=>u<l?-1:u===l?0:1:d(t)?a=t:Array.isArray(t)?a=(u,l)=>{let m=0;for(const f of t)if(m=u[f]<l[f]?-1:u[f]===l[f]?0:1,m!==0)break;return m}:a=(u,l)=>u[t]<l[t]?-1:u[t]===l[t]?0:1,i=r.next();i.done!==!0;i=r.next()){const u=a(s,i.value);s=u<0||u===0?s:i.value}return s??null}function O(e,t,r,i){const s=t==null||t===!0||t===!1?e:t,a=t==null||t===!0||t===!1?0:e,u=a<s,l=r!==!0&&r!==!1&&r!=null&&r!==0?r:u?1:-1,m=u&&l<0||!u&&l>0?-1*l:l,f=Math.ceil(Math.abs(s-a)/Math.abs(m)),H=!!(t===!0||r===!0||i!=null&&i),N=H?f*m+a:a;return a===s?new ct(N,0,0):H?new lt(N,f,m):new ut(N,f,m)}class ut{constructor(t,r,i){n(this,"initialValue");n(this,"length");n(this,"step");this.initialValue=t,this.length=r,this.step=i}[Symbol.iterator](){return new at(this.initialValue,this.length,this.step)}}class at{constructor(t,r,i){n(this,"value");n(this,"length");n(this,"step");n(this,"internalNext",()=>{const t=this.value;return this.value+=this.step,this.length--?c(t):o()});this.value=t,this.length=r,this.step=i}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}class lt{constructor(t,r,i){n(this,"initialValue");n(this,"length");n(this,"step");this.initialValue=t-i,this.length=r,this.step=i}[Symbol.iterator](){return new ht(this.initialValue,this.length,this.step)}}class ht{constructor(t,r,i){n(this,"value");n(this,"length");n(this,"step");n(this,"internalNext",()=>{const t=this.value;return this.value-=this.step,this.length--?c(t):o()});this.value=t,this.length=r,this.step=i}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}class ct{constructor(t,r,i){n(this,"initialValue");n(this,"length");n(this,"step");this.initialValue=t,this.length=r,this.step=i}[Symbol.iterator](){return new dt(this.initialValue,this.length,this.step)}}class dt{constructor(t,r,i){n(this,"value");n(this,"length");n(this,"step");this.value=t,this.length=r,this.step=i}next(){return o()}return(t){return o(t)}}function U(e,t,r){if(e==null)throw'The source "iterable" must be provided';if(!d(r))throw'"reducer" function must be provided';const i=e[Symbol.iterator]();let s=t,a=0;for(let u=i.next();u.done!==!0;u=i.next())s=r(s,u.value,a),a++;return s}function $(e,t){if(t<0)throw'"count" parameter must be greater or equal then 0';return new ft(e,t)}class ft{constructor(t,r){n(this,"value");n(this,"count");this.value=t,this.count=r}[Symbol.iterator](){return new mt(this.value,this.count)}}class mt{constructor(t,r){n(this,"leftToRepeat",0);n(this,"value");n(this,"count");n(this,"internalNext",()=>this.leftToRepeat--?c(this.value):(this.internalNext=o,o()));this.value=t,this.count=r,this.leftToRepeat=r,r===0&&(this.internalNext=o)}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}function D(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"predicate" function must be provided';const r=e[Symbol.iterator]();let i=0;for(let s=r.next();s.done!==!0;s=r.next())if(t(s.value,i++))return!0;return!1}function J(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"tapper" function must be provided';return new pt(e,t)}class pt{constructor(t,r){n(this,"tapper");n(this,"source");this.source=t,this.tapper=r}[Symbol.iterator](){return new xt(this.source,this.tapper)}}class xt{constructor(t,r){n(this,"index",0);n(this,"sourceIterator");n(this,"tapper");n(this,"internalNext",()=>{const t=this.sourceIterator.next();return t.done!==!0?(this.tapper(t.value,this.index++),t):(this.internalNext=o,o())});this.sourceIterator=t[Symbol.iterator](),this.tapper=r}next(){return this.internalNext()}return(t){return this.internalNext=o,o(t)}}function G(e,t){if(e==null)throw'The source "iterable" must be provided';if(!d(t))throw'"tapper" function must be provided';return new bt(e,t)}class bt{constructor(t,r){n(this,"tapper");n(this,"source");this.source=t,this.tapper=r}[Symbol.iterator](){return this.tapper(this.source,0),this.source[Symbol.iterator]()}}const It=Object.freeze(Object.defineProperty({__proto__:null,collectToArray:X,empty:S,filter:z,flatMap:M,forEach:A,forEachAsync:k,getMemoizeDefaultOptions:V,map:L,materialize:E,max:F,memoize:j,min:C,range:O,reduce:U,repeat:$,some:D,tap:J,tapChain:G},Symbol.toStringTag,{value:"Module"}));class p{constructor(t){n(this,"iterable");this.iterable=t}[Symbol.iterator](){return this.iterable[Symbol.iterator]()}collectToArray(){return Array.from(this.iterable)}filter(t){return new p(z(this.iterable,t))}flatMap(t){return new p(M(this.iterable,t))}forEach(t){return A(this.iterable,t)}forEachAsync(t){return k(this.iterable,t)}map(t){return new p(L(this.iterable,t))}materialize(){return new p(E(this.iterable))}max(t){return F(this.iterable,t)}memoize(t){return new p(j(this.iterable,t))}min(t){return C(this.iterable,t)}reduce(t,r){return U(this.iterable,t,r)}some(t){return D(this.iterable,t)}tap(t){return new p(J(this.iterable,t))}tapChain(t){return new p(G(this.iterable,t))}tapChainCreation(t){if(!d(t))throw'"tapper" function must be provided';return t(this),this}}function wt(){return b(S())}function b(e){if(e==null)throw'The source "iterable" must be provided';return new p(e)}function vt(e,t,r,i){return b(O(e,t,r,i))}function yt(e,t){return b($(e,t))}h.Functions=It,h.IterableLinqWrapper=p,h.Unit=g,h.empty=wt,h.from=b,h.fromRange=vt,h.repeat=yt,h.unit=x,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
@@ -1,45 +0,0 @@
1
- import { Action, AsyncAction, Comparer, Mapper, Reducer, Predicate, Tapper, Unit } from './types';
2
- import { IMemoizeOptions } from './functions';
3
- export interface IIterableLinq<T> {
4
- [Symbol.iterator](): Iterator<T, any, undefined>;
5
- collectToArray(): T[];
6
- filter(predicate: Predicate<T>): IIterableLinq<T>;
7
- flatMap<R>(mapper: Mapper<T, Iterable<R>>): IIterableLinq<R>;
8
- forEach(action: Action<T>): Unit;
9
- forEachAsync(action: AsyncAction<T>): Promise<Unit>;
10
- map<R>(mapper: Mapper<T, R>): IIterableLinq<R>;
11
- materialize(): IIterableLinq<T>;
12
- max(comparer?: Comparer<T>): T | null | undefined;
13
- memoize(options?: IMemoizeOptions): IIterableLinq<T>;
14
- min(comparer?: Comparer<T>): T | null | undefined;
15
- reduce<R>(neutralElement: R, reducer: Reducer<T, R>): R;
16
- some(predicate: Predicate<T>): boolean;
17
- tap(tapper: Tapper<T>): IIterableLinq<T>;
18
- tapChain(tapper: Tapper<Iterable<T>>): IIterableLinq<T>;
19
- /**
20
- *
21
- * @operation `Tap`
22
- * @param chainCreationTapper
23
- */
24
- tapChainCreation(chainCreationTapper: (iterableLinqWrapper: IIterableLinq<T>) => Unit): IIterableLinq<T>;
25
- }
26
- export declare class IterableLinqWrapper<T> implements IIterableLinq<T> {
27
- constructor(iterable: Iterable<T>);
28
- [Symbol.iterator](): Iterator<T, any, undefined>;
29
- private iterable;
30
- collectToArray(): T[];
31
- filter(predicate: Predicate<T>): IIterableLinq<T>;
32
- flatMap<R>(mapper: Mapper<T, Iterable<R>>): IIterableLinq<R>;
33
- forEach(action: Action<T>): Unit;
34
- forEachAsync(action: AsyncAction<T>): Promise<Unit>;
35
- map<R>(mapper: Mapper<T, R>): IIterableLinq<R>;
36
- materialize(): IIterableLinq<T>;
37
- max(comparer?: Comparer<T>): T | null | undefined;
38
- memoize(options?: IMemoizeOptions): IIterableLinq<T>;
39
- min(comparer?: Comparer<T>): T | null | undefined;
40
- reduce<R>(neutralElement: R, reducer: Reducer<T, R>): R;
41
- some(predicate: Predicate<T>): boolean;
42
- tap(tapper: Tapper<T>): IIterableLinq<T>;
43
- tapChain(tapper: Tapper<Iterable<T>>): IIterableLinq<T>;
44
- tapChainCreation(chainCreationTapper: (iterableLinqWrapper: IIterableLinq<T>) => void): IIterableLinq<T>;
45
- }
@@ -1,3 +0,0 @@
1
- import { Unit } from "./unit";
2
- export declare type Action<T> = (value: T, index: number) => Unit;
3
- export declare type AsyncAction<T> = (value: T, index: number) => Promise<Unit>;
@@ -1,4 +0,0 @@
1
- declare type ComparerFunction<T> = (a: T, b: T) => number;
2
- declare type ComparingProps<T> = keyof T | Array<keyof T>;
3
- export declare type Comparer<T> = ComparerFunction<T> | ComparingProps<T>;
4
- export {};
@@ -1,7 +0,0 @@
1
- export * from './action';
2
- export * from './comparer';
3
- export * from './mapper';
4
- export * from './predicate';
5
- export * from './reducer';
6
- export * from './tapper';
7
- export * from './unit';
@@ -1 +0,0 @@
1
- export declare type Mapper<T, R> = (value: T, index: number) => R;
@@ -1 +0,0 @@
1
- export declare type Predicate<T> = (value: T, index: number) => boolean;
@@ -1 +0,0 @@
1
- export declare type Reducer<T, R> = (acc: R, value: T, index: number) => R;
@@ -1,2 +0,0 @@
1
- import { Unit } from "./unit";
2
- export declare type Tapper<T> = (value: T, index: number) => Unit;
@@ -1,3 +0,0 @@
1
- export declare class Unit {
2
- }
3
- export declare function unit(): Unit;
@@ -1,4 +0,0 @@
1
- export * from './iteratorResults';
2
- export * from './utils';
3
- import * as Validations from './validations';
4
- export { Validations };
@@ -1,4 +0,0 @@
1
- export declare function getIteratorResult<T>(done: boolean, value?: T): IteratorResult<T>;
2
- export declare function getContinueIteratorResult<T>(value: T): IteratorResult<T>;
3
- export declare function getDoneIteratorResult<T>(value?: T): IteratorResult<T>;
4
- export declare function getFlatIteratorResult<T>(result: IteratorResult<T>): IteratorResult<T>;
@@ -1,56 +0,0 @@
1
- /**
2
- * Checks if `value` is classified as a `Function` object.
3
- *
4
- * From [LoDash isFunction](https://github.com/lodash/lodash/blob/2f79053d7bc7c9c9561a30dda202b3dcd2b72b90/isFunction.js)
5
- *
6
- * @since 1.0.0
7
- * @category Lang
8
- * @param {*} value The value to check.
9
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
10
- * @example
11
- *
12
- * isFunction(class Any{})
13
- * // => true
14
- *
15
- * isFunction(() => {})
16
- * // => true
17
- *
18
- * isFunction(async () => {})
19
- * // => true
20
- *
21
- * isFunction(function * Any() {})
22
- * // => true
23
- *
24
- * isFunction(Math.round)
25
- * // => true
26
- *
27
- * isFunction(/abc/)
28
- * // => false
29
- */
30
- export declare function isFunction(value?: any): value is (...args: any[]) => any;
31
- /**
32
- *
33
- * Checks if `value` is classified as a `String` primitive or object.
34
- *
35
- * From [LoDash isString](https://github.com/lodash/lodash/blob/master/isString.js)
36
- *
37
- * @since 1.0.0
38
- * @param {*} value The value to check.
39
- * @returns {boolean} Returns `true` if `value` is a string, else `false`.
40
- * @example
41
- *
42
- * isString('abc')
43
- * // => true
44
- *
45
- * isString(1)
46
- * // => false
47
- */
48
- /**
49
- * Gets the `toStringTag` of `value`.
50
- *
51
- * From [LoDash internal getTag](https://github.com/lodash/lodash/blob/master/.internal/getTag.js)
52
- *
53
- * @private
54
- * @param {*} value The value to query.
55
- * @returns {string} Returns the `toStringTag`.
56
- */
@@ -1,5 +0,0 @@
1
- import { Mapper, Predicate } from "../types";
2
- export declare function throwIfNotIterable<T>(sourceIterable: Iterable<T>): void;
3
- export declare function thowIfNotValidPredicate<T>(predicate: Predicate<T>): void;
4
- export declare function thowIfNotValidMapper<T, R>(mapper: Mapper<T, R>): void;
5
- export declare function throwIfNotValidIterator<T, TR, TN>(sourceIterator: Iterator<T, TR, TN>): void;