@baleada/logic 0.20.33 → 0.20.34
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 +6 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -140,6 +140,11 @@ function createReverse() {
|
|
|
140
140
|
return reversed;
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
+
function createSort(compare) {
|
|
144
|
+
return (array) => {
|
|
145
|
+
return new Pipeable(array).pipe(createSlice({ from: 0 }), (sliced) => sliced.sort(compare));
|
|
146
|
+
};
|
|
147
|
+
}
|
|
143
148
|
function createSlug(options) {
|
|
144
149
|
return (string) => {
|
|
145
150
|
return slugify__default["default"](string, options);
|
|
@@ -3361,6 +3366,7 @@ exports.createReplace = createReplace;
|
|
|
3361
3366
|
exports.createReverse = createReverse;
|
|
3362
3367
|
exports.createSlice = createSlice;
|
|
3363
3368
|
exports.createSlug = createSlug;
|
|
3369
|
+
exports.createSort = createSort;
|
|
3364
3370
|
exports.createSwap = createSwap;
|
|
3365
3371
|
exports.createToEntries = createToEntries;
|
|
3366
3372
|
exports.createUnique = createUnique;
|
package/lib/index.d.ts
CHANGED
|
@@ -887,6 +887,7 @@ declare function createFilter<Item>(condition: (item?: Item, index?: number) =>
|
|
|
887
887
|
declare function createMap<Item, Transformed = Item>(transform: (item?: Item, index?: number) => Transformed): ArrayFunction<Item, Transformed[]>;
|
|
888
888
|
declare function createConcat<Item>(...arrays: Item[][]): ArrayFunction<Item, Item[]>;
|
|
889
889
|
declare function createReverse<Item>(): ArrayFunction<Item, Item[]>;
|
|
890
|
+
declare function createSort<Item>(compare: (itemA: Item, itemB: Item) => number): ArrayFunction<Item, Item[]>;
|
|
890
891
|
declare type StringFunction<Returned> = (string: string) => Returned;
|
|
891
892
|
declare function createSlug(options?: Options): StringFunction<string>;
|
|
892
893
|
declare function createClip(required: string | RegExp): StringFunction<string>;
|
|
@@ -914,4 +915,4 @@ declare class Pipeable {
|
|
|
914
915
|
pipeAsync(...fns: ((...args: any[]) => Promise<any>)[]): Promise<any>;
|
|
915
916
|
}
|
|
916
917
|
|
|
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 };
|
|
918
|
+
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 };
|
package/lib/index.js
CHANGED
|
@@ -129,6 +129,11 @@ function createReverse() {
|
|
|
129
129
|
return reversed;
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
+
function createSort(compare) {
|
|
133
|
+
return (array) => {
|
|
134
|
+
return new Pipeable(array).pipe(createSlice({ from: 0 }), (sliced) => sliced.sort(compare));
|
|
135
|
+
};
|
|
136
|
+
}
|
|
132
137
|
function createSlug(options) {
|
|
133
138
|
return (string) => {
|
|
134
139
|
return slugify(string, options);
|
|
@@ -3313,4 +3318,4 @@ class Storeable {
|
|
|
3313
3318
|
}
|
|
3314
3319
|
}
|
|
3315
3320
|
|
|
3316
|
-
export { Animateable, Completeable, Copyable, Delayable, Dispatchable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Pipeable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable, 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 };
|
|
3321
|
+
export { Animateable, Completeable, Copyable, Delayable, Dispatchable, Drawable, Fetchable, Fullscreenable, Grantable, Listenable, Navigateable, Pickable, Pipeable, Recognizeable, Resolveable, Sanitizeable, Searchable, Storeable, 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 };
|