@pdg/data 1.0.1 → 1.0.3

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/dist/index.esm.js CHANGED
@@ -37,23 +37,15 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
37
37
  var e = new Error(message);
38
38
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
39
39
  };/********************************************************************************************************************
40
- * {label, value, ...other} 객체 생성하여 반환하는 함수
41
- * @param label - label
42
- * @param value - value
43
- * @param other - 기타 속성
44
- * @returns 생성된 객체
40
+ * 구현
45
41
  * ******************************************************************************************************************/
46
42
  function lv(label, value, other) {
47
- return __assign({ label: label, value: value }, other);
43
+ return __assign(__assign({}, other), { label: label, value: value });
48
44
  }/********************************************************************************************************************
49
- * {value, label, ...other} 객체 생성하여 반환하는 함수
50
- * @param value - value
51
- * @param label - label
52
- * @param other - 기타 속성
53
- * @returns 생성된 객체
45
+ * 구현
54
46
  * ******************************************************************************************************************/
55
47
  function vl(value, label, other) {
56
- return __assign({ value: value, label: label }, other);
48
+ return __assign(__assign({}, other), { value: value, label: label });
57
49
  }var index = {
58
50
  copy: copy,
59
51
  lv: lv,
package/dist/index.js CHANGED
@@ -37,23 +37,15 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
37
37
  var e = new Error(message);
38
38
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
39
39
  };/********************************************************************************************************************
40
- * {label, value, ...other} 객체 생성하여 반환하는 함수
41
- * @param label - label
42
- * @param value - value
43
- * @param other - 기타 속성
44
- * @returns 생성된 객체
40
+ * 구현
45
41
  * ******************************************************************************************************************/
46
42
  function lv(label, value, other) {
47
- return __assign({ label: label, value: value }, other);
43
+ return __assign(__assign({}, other), { label: label, value: value });
48
44
  }/********************************************************************************************************************
49
- * {value, label, ...other} 객체 생성하여 반환하는 함수
50
- * @param value - value
51
- * @param label - label
52
- * @param other - 기타 속성
53
- * @returns 생성된 객체
45
+ * 구현
54
46
  * ******************************************************************************************************************/
55
47
  function vl(value, label, other) {
56
- return __assign({ value: value, label: label }, other);
48
+ return __assign(__assign({}, other), { value: value, label: label });
57
49
  }var index = {
58
50
  copy: copy,
59
51
  lv: lv,
package/dist/lv.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ /********************************************************************************************************************
2
+ * {label, value} 객체 생성하여 반환하는 함수
3
+ * @param label - label
4
+ * @param value - value
5
+ * @returns 생성된 객체
6
+ * ******************************************************************************************************************/
7
+ export declare function lv<L, const V>(label: L, value: V): {
8
+ label: L;
9
+ value: V;
10
+ };
1
11
  /********************************************************************************************************************
2
12
  * {label, value, ...other} 객체 생성하여 반환하는 함수
3
13
  * @param label - label
@@ -5,9 +15,9 @@
5
15
  * @param other - 기타 속성
6
16
  * @returns 생성된 객체
7
17
  * ******************************************************************************************************************/
8
- export declare function lv<L, V, Other extends {
9
- [key: string]: unknown;
10
- }>(label: L, value: V, other?: Other): {
18
+ export declare function lv<L, const V, Other extends {
19
+ [K in 'label' | 'value']?: never;
20
+ } & object>(label: L, value: V, other: Other): {
11
21
  label: L;
12
22
  value: V;
13
23
  } & Other;
package/dist/vl.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ /********************************************************************************************************************
2
+ * {value, label} 객체 생성하여 반환하는 함수
3
+ * @param value - value
4
+ * @param label - label
5
+ * @returns 생성된 객체
6
+ * ******************************************************************************************************************/
7
+ export declare function vl<const V, L>(value: V, label: L): {
8
+ value: V;
9
+ label: L;
10
+ };
1
11
  /********************************************************************************************************************
2
12
  * {value, label, ...other} 객체 생성하여 반환하는 함수
3
13
  * @param value - value
@@ -5,9 +15,9 @@
5
15
  * @param other - 기타 속성
6
16
  * @returns 생성된 객체
7
17
  * ******************************************************************************************************************/
8
- export declare function vl<V, L, Other extends {
9
- [key: string]: unknown;
10
- }>(value: V, label: L, other?: Other): {
18
+ export declare function vl<const V, L, Other extends {
19
+ [K in 'label' | 'value']?: never;
20
+ } & object>(value: V, label: L, other?: Other): {
11
21
  value: V;
12
22
  label: L;
13
23
  } & Other;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@pdg/data",
3
3
  "title": "Typescript Data Module",
4
4
  "description": "Typescript Data Module",
5
- "version": "1.0.1",
5
+ "version": "1.0.3",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "module": "./dist/index.esm.js",
@@ -30,9 +30,15 @@
30
30
  "scripts": {
31
31
  "dev": "cd examples && npm run dev",
32
32
  "build": "npm run test && npm run lint && rollup -c --bundleConfigAsCjs",
33
+ "git:commit": "node .git-commit.cjs",
34
+ "git:push": "git push",
35
+ "git:commit:push": "npm run git:commit && npm run git:push",
36
+ "git:merge:mirror": "node .git-merge.cjs mirror main",
37
+ "reset:gitignore": "git rm -r --cached . && git add .",
33
38
  "pub": "npm i && npm run build && npm publish --access=public && rm ./.git/hooks/pre-commit",
34
39
  "lint": "eslint './src/**/*.ts'",
35
- "reinstall-module": "rm -rf node_modules && rm -f package-lock.json && npm i",
40
+ "reinstall": "npm run reinstall:module",
41
+ "reinstall:module": "rm -rf node_modules && rm -f package-lock.json && npm i",
36
42
  "test": "jest"
37
43
  },
38
44
  "author": "YOUNG CHUL PARK",