banks-helper 2.1.0 → 2.1.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.
package/banks.ts CHANGED
@@ -999,7 +999,7 @@ export const banks: IBankLogoItem[] = [
999
999
  },
1000
1000
  {
1001
1001
  fileName: 'metallinvestbank.svg',
1002
- humanName: 'Металлинвестбанк',
1002
+ humanName: 'АКБ Металлинвестбанк',
1003
1003
  matchedBankNames: [
1004
1004
  'PUBLIC JOINT STOCK COMPANY STOCK COMMERCIAL BANK "METALLURGICAL INVESTMENT BANK"',
1005
1005
  'PJSC SCB "Metallinvestbank"',
@@ -2138,8 +2138,6 @@ export const banks: IBankLogoItem[] = [
2138
2138
  'JSCB JSCB BINBANK',
2139
2139
  'PUBLIC JOINT-STOCK COMPANY BANK OTKRITIE FINANCIAL CORPORATION',
2140
2140
  'Открытие',
2141
- 'ОТП БАНК',
2142
- // 'ПРИО-ВНЕШТОРГБАНК',
2143
2141
  'ФК ОТКРЫТИЕ',
2144
2142
  'Public Joint-Stock Company "Bank Otkritie Financial Corporation"',
2145
2143
  '"Bank Otkritie Financial Corporation" (Public Joint-Stock Company)',
@@ -2392,11 +2390,6 @@ export const banks: IBankLogoItem[] = [
2392
2390
  humanName: 'ЯРИНТЕРБАНК',
2393
2391
  matchedBankNames: [],
2394
2392
  },
2395
- {
2396
- fileName: 'interprogressbank.png',
2397
- humanName: 'ИНТЕРПРОГРЕССБАНК',
2398
- matchedBankNames: [],
2399
- },
2400
2393
  {
2401
2394
  fileName: 'minbank.png',
2402
2395
  humanName: 'Московский Индустриальный Банк',
package/example/main.ts CHANGED
@@ -2,11 +2,32 @@ import { IBankLogoItem } from '../IBankLogoItem';
2
2
  import { banks } from '../banks';
3
3
 
4
4
  const bankTemplate: HTMLTemplateElement = document.querySelector('#bank');
5
+ const outputElement = document.querySelector('#result');
6
+
7
+ const x = banks.reduce((result, { matchedBankNames, humanName }) => {
8
+ humanName = humanName.replace(/"/g, '\\"');
9
+
10
+ if (matchedBankNames.length) {
11
+ matchedBankNames.forEach((bankName) => {
12
+ bankName = bankName.replace(/"/g, '\\"');
13
+
14
+ if (bankName.toUpperCase() !== humanName.toUpperCase()) {
15
+ result += `"${bankName.toUpperCase()}" => "${humanName}",\n`;
16
+ }
17
+ });
18
+ }
19
+ result += `"${humanName.toUpperCase()}" => "${humanName}",\n`;
20
+ result += `\n`;
21
+
22
+ return result;
23
+ }, ``);
24
+
25
+ console.log(x);
5
26
 
6
27
  const createBankLogoElement = ({ fileName, humanName, matchedBankNames }: IBankLogoItem) => {
7
28
  const itemElement = bankTemplate.content.querySelector('.bank').cloneNode(true) as Element;
8
29
  const imageElement: HTMLImageElement = itemElement.querySelector('.bank__logo');
9
- imageElement.src ='logos/' + (fileName ? fileName : 'unknown.svg');
30
+ imageElement.src = 'logos/' + (fileName ? fileName : 'unknown.svg');
10
31
  imageElement.alt = fileName;
11
32
 
12
33
  if (!fileName) {
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var banks_1 = require("../banks");
4
+ console.log(banks_1.banks);
5
+ //# sourceMappingURL=transform-to-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform-to-server.js","sourceRoot":"","sources":["transform-to-server.ts"],"names":[],"mappings":";;AAAA,kCAAiC;AAEjC,OAAO,CAAC,GAAG,CAAC,aAAK,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { banks } from '../banks';
2
+
3
+ console.log(banks);
package/index.html CHANGED
@@ -8,6 +8,7 @@
8
8
  <link rel="stylesheet" href="example/style.css">
9
9
  </head>
10
10
  <body>
11
+ <pre id="result"></pre>
11
12
  <ol class="banks-list"></ol>
12
13
 
13
14
  <template id="bank">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "banks-helper",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Helps to work with banks names",
5
5
  "main": "index.ts",
6
6
  "scripts": {
Binary file
Binary file