@baleada/logic 0.20.30 → 0.21.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.
- package/lib/index.cjs +198 -55
- package/lib/index.d.ts +13 -39
- package/lib/index.js +194 -52
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
|
@@ -852,59 +852,33 @@ declare function createForEachAsync<Item>(forEach: (item?: Item, index?: number)
|
|
|
852
852
|
declare function createMapAsync<Item, Mapped>(transform: (item?: Item, index?: number) => Promise<Mapped>): ArrayFunctionAsync<Item, Mapped[]>;
|
|
853
853
|
declare function createFilterAsync<Item>(condition: (item?: Item, index?: number) => Promise<boolean>): ArrayFunctionAsync<Item, Item[]>;
|
|
854
854
|
declare type ArrayFunction<Item, Returned> = (array: Item[]) => Returned;
|
|
855
|
-
declare function createDelete<Item>(
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
items: Item[];
|
|
864
|
-
}) & {
|
|
865
|
-
index: number;
|
|
866
|
-
}): ArrayFunction<Item, Item[]>;
|
|
867
|
-
declare function createReorder<Item>({ from, to }: {
|
|
868
|
-
from: {
|
|
869
|
-
start: number;
|
|
870
|
-
itemCount: number;
|
|
871
|
-
} | number;
|
|
872
|
-
to: number;
|
|
873
|
-
}): ArrayFunction<Item, Item[]>;
|
|
874
|
-
declare function createSwap<Item>({ indices }: {
|
|
875
|
-
indices: [number, number];
|
|
876
|
-
}): ArrayFunction<Item, Item[]>;
|
|
877
|
-
declare function createReplace<Item>({ index, item }: {
|
|
878
|
-
index: number;
|
|
879
|
-
item: Item;
|
|
880
|
-
}): ArrayFunction<Item, Item[]>;
|
|
855
|
+
declare function createDelete<Item>(index: number): ArrayFunction<Item, Item[]>;
|
|
856
|
+
declare function createInsert<Item>(item: Item, index: number): ArrayFunction<Item, Item[]>;
|
|
857
|
+
declare function createReorder<Item>(from: {
|
|
858
|
+
start: number;
|
|
859
|
+
itemCount: number;
|
|
860
|
+
} | number, to: number): ArrayFunction<Item, Item[]>;
|
|
861
|
+
declare function createSwap<Item>(indices: [number, number]): ArrayFunction<Item, Item[]>;
|
|
862
|
+
declare function createReplace<Item>(index: number, item: Item): ArrayFunction<Item, Item[]>;
|
|
881
863
|
declare function createUnique<Item>(): ArrayFunction<Item, Item[]>;
|
|
882
|
-
declare function createSlice<Item>(
|
|
883
|
-
from: number;
|
|
884
|
-
to?: number;
|
|
885
|
-
}): ArrayFunction<Item, Item[]>;
|
|
864
|
+
declare function createSlice<Item>(from: number, to?: number): ArrayFunction<Item, Item[]>;
|
|
886
865
|
declare function createFilter<Item>(condition: (item?: Item, index?: number) => boolean): ArrayFunction<Item, Item[]>;
|
|
887
866
|
declare function createMap<Item, Transformed = Item>(transform: (item?: Item, index?: number) => Transformed): ArrayFunction<Item, Transformed[]>;
|
|
888
867
|
declare function createConcat<Item>(...arrays: Item[][]): ArrayFunction<Item, Item[]>;
|
|
889
868
|
declare function createReverse<Item>(): ArrayFunction<Item, Item[]>;
|
|
869
|
+
declare function createSort<Item>(compare: (itemA: Item, itemB: Item) => number): ArrayFunction<Item, Item[]>;
|
|
890
870
|
declare type StringFunction<Returned> = (string: string) => Returned;
|
|
891
871
|
declare function createSlug(options?: Options): StringFunction<string>;
|
|
892
872
|
declare function createClip(required: string | RegExp): StringFunction<string>;
|
|
893
873
|
declare type NumberFunction<Returned> = (number: number) => Returned;
|
|
894
|
-
declare function createClamp(
|
|
895
|
-
min: number;
|
|
896
|
-
max: number;
|
|
897
|
-
}): NumberFunction<number>;
|
|
874
|
+
declare function createClamp(min: number, max: number): NumberFunction<number>;
|
|
898
875
|
declare type Potentiality<Outcome> = {
|
|
899
876
|
outcome: Outcome;
|
|
900
877
|
probability: number;
|
|
901
878
|
};
|
|
902
879
|
declare function createDetermine<Outcome>(potentialities: Potentiality<Outcome>[]): NumberFunction<Outcome>;
|
|
903
880
|
declare type MapFunction<Key, Value, Returned> = (transform: Map<Key, Value>) => Returned;
|
|
904
|
-
declare function createRename<Key, Value>(
|
|
905
|
-
from: Key;
|
|
906
|
-
to: Key;
|
|
907
|
-
}): MapFunction<Key, Value, Map<Key, Value>>;
|
|
881
|
+
declare function createRename<Key, Value>(from: Key, to: Key): MapFunction<Key, Value, Map<Key, Value>>;
|
|
908
882
|
declare type ObjectFunction<Key extends string | number | symbol, Value, Returned> = (transform: Record<Key, Value>) => Returned;
|
|
909
883
|
declare function createToEntries<Key extends string | number | symbol, Value>(): ObjectFunction<Key, Value, [Key, Value][]>;
|
|
910
884
|
declare class Pipeable {
|
|
@@ -914,4 +888,4 @@ declare class Pipeable {
|
|
|
914
888
|
pipeAsync(...fns: ((...args: any[]) => Promise<any>)[]): Promise<any>;
|
|
915
889
|
}
|
|
916
890
|
|
|
917
|
-
export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, ArrayFunction, ArrayFunctionAsync, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, DispatchOptions, Dispatchable, DispatchableOptions, DispatchableStatus, Drawable, DrawableOptions, DrawableState, DrawableStatus, FetchOptions, FetchOptionsApi, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableClickcombo, ListenableKeycombo, ListenableKeycomboItem, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MapFunction, Navigateable, NavigateableOptions, NavigateableStatus, NumberFunction, ObjectFunction, Pickable, PickableOptions, PickableStatus, Pipeable, RecognizeOptions, Recognizeable, RecognizeableEffectApi, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableGetPromise, ResolveableOptions, ResolveableStatus, Sanitizeable, SanitizeableOptions, SanitizeableStatus, Searchable, SearchableOptions, SearchableStatus, Storeable, StoreableOptions, StoreableStatus, StringFunction, createClamp, createClip, createConcat, createDelete, createDetermine, createFilter, createFilterAsync, createForEachAsync, createInsert, createMap, createMapAsync, createReduce, createReduceAsync, createRename, createReorder, createReplace, createReverse, createSlice, createSlug, createSwap, createToEntries, createUnique, easingsNetInBack, easingsNetInCirc, easingsNetInCubic, easingsNetInExpo, easingsNetInOutBack, easingsNetInOutCirc, easingsNetInOutCubic, easingsNetInOutExpo, easingsNetInOutQuad, easingsNetInOutQuint, easingsNetInOutSine, easingsNetInQuad, easingsNetInQuart, easingsNetInQuint, easingsNetInSine, easingsNetOutBack, easingsNetOutCirc, easingsNetOutCubic, easingsNetOutExpo, easingsNetOutQuad, easingsNetOutQuint, easingsNetOutSine, ensureKeycombo, eventMatchesKeycombo, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };
|
|
891
|
+
export { AnimateFrame, AnimateFrameEffect, AnimateOptions, Animateable, AnimateableKeyframe, AnimateableOptions, AnimateableStatus, ArrayFunction, ArrayFunctionAsync, CompleteOptions, Completeable, CompleteableOptions, CompleteableStatus, Copyable, CopyableOptions, CopyableStatus, Delayable, DelayableEffect, DelayableOptions, DelayableStatus, DispatchOptions, Dispatchable, DispatchableOptions, DispatchableStatus, Drawable, DrawableOptions, DrawableState, DrawableStatus, FetchOptions, FetchOptionsApi, Fetchable, FetchableOptions, FetchableStatus, Fullscreenable, FullscreenableGetElement, FullscreenableOptions, FullscreenableStatus, Grantable, GrantableOptions, GrantableStatus, ListenEffect, ListenEffectParam, ListenOptions, Listenable, ListenableActive, ListenableClickcombo, ListenableKeycombo, ListenableKeycomboItem, ListenableOptions, ListenablePointercombo, ListenableStatus, ListenableSupportedEventType, ListenableSupportedType, MapFunction, Navigateable, NavigateableOptions, NavigateableStatus, NumberFunction, ObjectFunction, Pickable, PickableOptions, PickableStatus, Pipeable, RecognizeOptions, Recognizeable, RecognizeableEffectApi, RecognizeableOptions, RecognizeableStatus, Resolveable, ResolveableGetPromise, ResolveableOptions, ResolveableStatus, Sanitizeable, SanitizeableOptions, SanitizeableStatus, Searchable, SearchableOptions, SearchableStatus, Storeable, StoreableOptions, StoreableStatus, StringFunction, createClamp, createClip, createConcat, createDelete, createDetermine, createFilter, createFilterAsync, createForEachAsync, createInsert, createMap, createMapAsync, createReduce, createReduceAsync, createRename, createReorder, createReplace, createReverse, createSlice, createSlug, createSort, createSwap, createToEntries, createUnique, easingsNetInBack, easingsNetInCirc, easingsNetInCubic, easingsNetInExpo, easingsNetInOutBack, easingsNetInOutCirc, easingsNetInOutCubic, easingsNetInOutExpo, easingsNetInOutQuad, easingsNetInOutQuint, easingsNetInOutSine, easingsNetInQuad, easingsNetInQuart, easingsNetInQuint, easingsNetInSine, easingsNetOutBack, easingsNetOutCirc, easingsNetOutCubic, easingsNetOutExpo, easingsNetOutQuad, easingsNetOutQuint, easingsNetOutSine, ensureKeycombo, eventMatchesKeycombo, linear, materialAccelerated, materialDecelerated, materialStandard, toD, toFlattenedD, verouEase, verouEaseIn, verouEaseInOut, verouEaseOut };
|