@powfix/core-js 0.13.32 → 0.13.33

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.
@@ -1,4 +1,5 @@
1
1
  export declare class ArrayUtils {
2
+ static castArray<T>(value: T | T[]): T[];
2
3
  /**
3
4
  * 객체를 요소로 가지는 배열에서 가장 큰 값(Property)를 가지는 객체를 반환한다
4
5
  * @param e 객체 배열
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ArrayUtils = void 0;
4
+ const global_1 = require("./global");
4
5
  class ArrayUtils {
6
+ static castArray(value) {
7
+ return (0, global_1.castArray)(value);
8
+ }
5
9
  /**
6
10
  * 객체를 요소로 가지는 배열에서 가장 큰 값(Property)를 가지는 객체를 반환한다
7
11
  * @param e 객체 배열
@@ -0,0 +1 @@
1
+ export declare function castArray<T>(value: T | T[]): T[];
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.castArray = castArray;
4
+ function castArray(value) {
5
+ return Array.isArray(value) ? value : [value];
6
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './between';
2
+ export * from './castArray';
2
3
  export * from './circularDistance';
3
4
  export * from './sleep';
4
5
  export * from './fallbackIfEqual';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./between"), exports);
18
+ __exportStar(require("./castArray"), exports);
18
19
  __exportStar(require("./circularDistance"), exports);
19
20
  __exportStar(require("./sleep"), exports);
20
21
  __exportStar(require("./fallbackIfEqual"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powfix/core-js",
3
- "version": "0.13.32",
3
+ "version": "0.13.33",
4
4
  "description": "core package",
5
5
  "author": "Kwon Kyung-Min <powfix@gmail.com>",
6
6
  "private": false,