@yamato-daiwa/es-extensions 1.7.0 → 1.7.1

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.
@@ -12,7 +12,7 @@ function getLastElementOfArray(targetArray, options) {
12
12
  if ((0, isUndefined_1.default)(lastElementOfTargetArray)) {
13
13
  if (options?.mustThrowErrorIfArrayIsEmpty === true) {
14
14
  Logger_1.default.throwErrorAndLog({
15
- errorInstance: new UnexpectedEventError_1.default("Contrary to expectations, target array is empty thus there is not the last element could be accessed."),
15
+ errorInstance: new UnexpectedEventError_1.default("Contrary to expectations, target array is empty thus there is no the last element could be accessed."),
16
16
  title: UnexpectedEventError_1.default.localization.defaultTitle,
17
17
  occurrenceLocation: "getLastElementOfArray(targetArray, options)"
18
18
  });
@@ -16,7 +16,7 @@ function moveArrayElementTo1Position(compoundParameter) {
16
16
  messageSpecificPart: "Target array must contain at least 2 elements while actually contains " +
17
17
  `${compoundParameter.targetArray.length}. ` +
18
18
  "This situation is being considered as an error when \"errorMustBeThrownIf.elementsCountIsLessThan2\" " +
19
- "flag is set to \"true\"."
19
+ "flag has been set to \"true\"."
20
20
  }),
21
21
  title: InvalidParameterValueError_1.default.localization.defaultTitle,
22
22
  occurrenceLocation: "moveArrayElementTo1Position(compoundParameter)"
@@ -37,7 +37,7 @@ function moveArrayElementTo1Position(compoundParameter) {
37
37
  parameterName: "compoundParameter",
38
38
  messageSpecificPart: "Target element number is out of range. " +
39
39
  "This situation is being considered as an error when " +
40
- "\"errorMustBeThrownIf.targetElementNumberIsOutOfRange\" flag is set to \"true\"."
40
+ "\"errorMustBeThrownIf.targetElementNumberIsOutOfRange\" flag has been set to \"true\"."
41
41
  }),
42
42
  title: InvalidParameterValueError_1.default.localization.defaultTitle,
43
43
  occurrenceLocation: "moveArrayElementTo1Position(compoundParameter)"
@@ -12,14 +12,14 @@ const MockGatewayHelperLocalization__English = {
12
12
  description: "The \"MockGatewayHelper\" class has finished the simulation of the data retrieving for the transaction " +
13
13
  `"${gatewayName}.${transactionName}".` +
14
14
  ((0, isNonEmptyString_1.default)(formattedRequestParameters) ? `\n\nRequest parameters:\n${formattedRequestParameters}` : "") +
15
- (0, isNonEmptyString_1.default)(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : ""
15
+ ((0, isNonEmptyString_1.default)(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : "")
16
16
  }),
17
17
  generateDataSubmittingSimulationCompletedLog: ({ gatewayName, transactionName, formattedRequestData, formattedResponseData }) => ({
18
18
  title: `"${gatewayName}.${transactionName}", the simulation of the data submitting has complete`,
19
19
  description: "The \"MockGatewayHelper\" class has finished the simulation of the data submitting for the transaction " +
20
20
  `"${gatewayName}.${transactionName}"` +
21
21
  ((0, isNonEmptyString_1.default)(formattedRequestData) ? `\n\nRequest data:\n${formattedRequestData}` : "") +
22
- (0, isNonEmptyString_1.default)(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : ""
22
+ ((0, isNonEmptyString_1.default)(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : "")
23
23
  })
24
24
  };
25
25
  exports.default = MockGatewayHelperLocalization__English;
@@ -6,7 +6,7 @@ export default function getLastElementOfArray(targetArray, options) {
6
6
  if (isUndefined(lastElementOfTargetArray)) {
7
7
  if (options?.mustThrowErrorIfArrayIsEmpty === true) {
8
8
  Logger.throwErrorAndLog({
9
- errorInstance: new UnexpectedEventError("Contrary to expectations, target array is empty thus there is not the last element could be accessed."),
9
+ errorInstance: new UnexpectedEventError("Contrary to expectations, target array is empty thus there is no the last element could be accessed."),
10
10
  title: UnexpectedEventError.localization.defaultTitle,
11
11
  occurrenceLocation: "getLastElementOfArray(targetArray, options)"
12
12
  });
@@ -10,7 +10,7 @@ export default function moveArrayElementTo1Position(compoundParameter) {
10
10
  messageSpecificPart: "Target array must contain at least 2 elements while actually contains " +
11
11
  `${compoundParameter.targetArray.length}. ` +
12
12
  "This situation is being considered as an error when \"errorMustBeThrownIf.elementsCountIsLessThan2\" " +
13
- "flag is set to \"true\"."
13
+ "flag has been set to \"true\"."
14
14
  }),
15
15
  title: InvalidParameterValueError.localization.defaultTitle,
16
16
  occurrenceLocation: "moveArrayElementTo1Position(compoundParameter)"
@@ -31,7 +31,7 @@ export default function moveArrayElementTo1Position(compoundParameter) {
31
31
  parameterName: "compoundParameter",
32
32
  messageSpecificPart: "Target element number is out of range. " +
33
33
  "This situation is being considered as an error when " +
34
- "\"errorMustBeThrownIf.targetElementNumberIsOutOfRange\" flag is set to \"true\"."
34
+ "\"errorMustBeThrownIf.targetElementNumberIsOutOfRange\" flag has been set to \"true\"."
35
35
  }),
36
36
  title: InvalidParameterValueError.localization.defaultTitle,
37
37
  occurrenceLocation: "moveArrayElementTo1Position(compoundParameter)"
@@ -7,14 +7,14 @@ const MockGatewayHelperLocalization__English = {
7
7
  description: "The \"MockGatewayHelper\" class has finished the simulation of the data retrieving for the transaction " +
8
8
  `"${gatewayName}.${transactionName}".` +
9
9
  (isNonEmptyString(formattedRequestParameters) ? `\n\nRequest parameters:\n${formattedRequestParameters}` : "") +
10
- isNonEmptyString(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : ""
10
+ (isNonEmptyString(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : "")
11
11
  }),
12
12
  generateDataSubmittingSimulationCompletedLog: ({ gatewayName, transactionName, formattedRequestData, formattedResponseData }) => ({
13
13
  title: `"${gatewayName}.${transactionName}", the simulation of the data submitting has complete`,
14
14
  description: "The \"MockGatewayHelper\" class has finished the simulation of the data submitting for the transaction " +
15
15
  `"${gatewayName}.${transactionName}"` +
16
16
  (isNonEmptyString(formattedRequestData) ? `\n\nRequest data:\n${formattedRequestData}` : "") +
17
- isNonEmptyString(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : ""
17
+ (isNonEmptyString(formattedResponseData) ? `\n\nResponse data:\n${formattedResponseData}` : "")
18
18
  })
19
19
  };
20
20
  export default MockGatewayHelperLocalization__English;
package/README.md CHANGED
@@ -9,7 +9,7 @@ Helper functions and classes aimed to reduce the routine code.
9
9
  Build-in TypeScript type safety without `any` type.
10
10
  Oriented to TypeScript users investing the time to quality including type-safety.
11
11
 
12
- ![Hero image of @yamato-daiwa/es-extensions](https://user-images.githubusercontent.com/41653501/168199236-0895483f-e4f1-4d1f-b7a8-ab296e51a57d.png)
12
+ ![Hero image of @yamato-daiwa/es-extensions]("https://repository-images.githubusercontent.com/376176365/ab848ff3-8bfb-4142-8b8f-fe191340bb3a)
13
13
 
14
14
 
15
15
  ## Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamato-daiwa/es-extensions",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "Helper functions and classes aimed to reduce the routine code. Build-in TypeScript type safety.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -46,7 +46,7 @@
46
46
  "scripts": {
47
47
  "Rebuild Distributable": "rimraf Distributable & tsc -p tsconfig-cjs.json && tsc -p tsconfig-esm.json",
48
48
  "Lint": "eslint Source Tests",
49
- "Rebuild Distributable and Realize Alpha": "npm run \"Rebuild distributable\" && npm publish --tag alpha",
50
- "Rebuild distributable and Realize RC": "npm run \"Rebuild distributable\" && npm publish --tag rc"
49
+ "Rebuild Distributable and Realize Alpha": "npm run \"Rebuild Distributable\" && npm publish --tag alpha",
50
+ "Rebuild distributable and Realize RC": "npm run \"Rebuild Distributable\" && npm publish --tag rc"
51
51
  }
52
52
  }