baja-lite 1.0.6 → 1.0.7

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.
@@ -8,9 +8,8 @@ const convert = function (childrens, param, parentIds, myBatisMapper) {
8
8
  statement += convertChildren(children, param, parentIds, myBatisMapper);
9
9
  }
10
10
  // Check not converted Parameters
11
- var regexList = ['\\#{\\S*}', '\\${\\S*}'];
12
- for (var i = 0, regexString; regexString = regexList[i]; i++) {
13
- var regex = new RegExp(regex, 'g');
11
+ const regexList = ['\\#{\\S*}', '\\${\\S*}'];
12
+ for (let i = 0, regexString; regexString = regexList[i]; i++) {
14
13
  var checkParam = statement.match(regexString);
15
14
  if (checkParam != null && checkParam.length > 0) {
16
15
  throw new Error("Parameter " + checkParam.join(",") + " is not converted.");
package/es/convert-xml.js CHANGED
@@ -5,9 +5,8 @@ export const convert = function (childrens, param, parentIds, myBatisMapper) {
5
5
  statement += convertChildren(children, param, parentIds, myBatisMapper);
6
6
  }
7
7
  // Check not converted Parameters
8
- var regexList = ['\\#{\\S*}', '\\${\\S*}'];
9
- for (var i = 0, regexString; regexString = regexList[i]; i++) {
10
- var regex = new RegExp(regex, 'g');
8
+ const regexList = ['\\#{\\S*}', '\\${\\S*}'];
9
+ for (let i = 0, regexString; regexString = regexList[i]; i++) {
11
10
  var checkParam = statement.match(regexString);
12
11
  if (checkParam != null && checkParam.length > 0) {
13
12
  throw new Error("Parameter " + checkParam.join(",") + " is not converted.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baja-lite",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "some util for self",
5
5
  "homepage": "https://github.com/void-soul/util-man",
6
6
  "repository": {
@@ -14,11 +14,9 @@ export const convert = function (childrens: XML[], param: Record<string, any>, p
14
14
  statement += convertChildren(children, param, parentIds, myBatisMapper);
15
15
  }
16
16
  // Check not converted Parameters
17
- var regexList = ['\\#{\\S*}', '\\${\\S*}'];
18
- for (var i = 0, regexString: string; regexString = regexList[i]!; i++) {
19
- var regex = new RegExp(regex, 'g');
17
+ const regexList = ['\\#{\\S*}', '\\${\\S*}'];
18
+ for (let i = 0, regexString: string; regexString = regexList[i]!; i++) {
20
19
  var checkParam = statement.match(regexString);
21
-
22
20
  if (checkParam != null && checkParam.length > 0) {
23
21
  throw new Error("Parameter " + checkParam.join(",") + " is not converted.");
24
22
  }
package/src/object.ts CHANGED
@@ -155,7 +155,7 @@ export const mixArray = <T>(array: T[], key: keyof T, defKey?: string): { [key:
155
155
  if (!result[ki]) {
156
156
  result[ki] = 0;
157
157
  }
158
- result[ki]++;
158
+ result[ki]!++;
159
159
  }
160
160
  return result;
161
161
  };