@creative-web-solution/front-library 7.1.25 → 7.1.26

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/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  ## 7.1.26
4
4
 
5
+ * Remove unused types
6
+ * Fix insert function
5
7
  * Use $target instead of e.target in EventManager callbacks
6
8
 
7
9
 
package/Helpers/Insert.ts CHANGED
@@ -9,24 +9,24 @@
9
9
  *
10
10
  * @returns New modified array
11
11
  */
12
- export function insert( list: any[], what: any, indexWhere: number ): any[] {
12
+ export function insert(list: any[], what: any, indexWhere: number): any[] {
13
13
  const listLength = list.length;
14
14
 
15
- if ( !listLength ) {
16
- return list;
15
+ if (!listLength) {
16
+ return [what];
17
17
  }
18
18
 
19
- if ( indexWhere <= 0 ) {
20
- return [ what, ...list ];
19
+ if (indexWhere <= 0) {
20
+ return [what, ...list];
21
21
  }
22
22
 
23
- if ( indexWhere >= listLength ) {
24
- return [ ...list, what ];
23
+ if (indexWhere >= listLength) {
24
+ return [...list, what];
25
25
  }
26
26
 
27
27
  return [
28
- ...list.slice( 0, indexWhere ),
28
+ ...list.slice(0, indexWhere),
29
29
  what,
30
- ...list.slice( indexWhere, list.length )
30
+ ...list.slice(indexWhere, list.length),
31
31
  ];
32
32
  }
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Front Library
2
2
 
3
- @version: 7.1.25
3
+ @version: 7.1.26
4
4
 
5
5
 
6
6
  ## Use
package/Types/Global.d.ts CHANGED
@@ -1,20 +0,0 @@
1
- type RequestIdleCallbackHandle = any;
2
- type RequestIdleCallbackOptions = {
3
- timeout: number;
4
- };
5
- type RequestIdleCallbackDeadline = {
6
- readonly didTimeout: boolean;
7
- timeRemaining: ( () => number );
8
- };
9
-
10
- interface Window {
11
- MSPointerEvent: any;
12
- $$DEBUG$$: any;
13
- requestIdleCallback: (
14
- (
15
- callback: (( deadline: RequestIdleCallbackDeadline ) => void ),
16
- opts?: RequestIdleCallbackOptions,
17
- ) => RequestIdleCallbackHandle
18
- );
19
- cancelIdleCallback: (( handle: RequestIdleCallbackHandle ) => void );
20
- }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@creative-web-solution/front-library",
3
3
  "title": "Frontend library",
4
4
  "description": "Frontend functions and modules",
5
- "version": "7.1.25",
5
+ "version": "7.1.26",
6
6
  "homepage": "https://github.com/creative-web-solution/front-library",
7
7
  "author": "Creative Web Solution <contact@cws-studio.com> (https://www.cws-studio.com)",
8
8
  "keywords": [],