banks-helper 1.1.1 → 1.1.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.
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="WEB_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$">
5
+ <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
+ <excludeFolder url="file://$MODULE_DIR$/temp" />
7
+ <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
+ </content>
9
+ <orderEntry type="inheritedJdk" />
10
+ <orderEntry type="sourceFolder" forTests="false" />
11
+ </component>
12
+ </module>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/banks-helper.iml" filepath="$PROJECT_DIR$/.idea/banks-helper.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,6 @@
1
+ export interface IBankLogoItem
2
+ {
3
+ fileName: string,
4
+ humanName: string;
5
+ matchedBankNames: string[];
6
+ }
package/index.ts CHANGED
@@ -1,13 +1,8 @@
1
- interface IBankLogoItem
2
- {
3
- fileName: string,
4
- humanName: string;
5
- matchedBankNames: string[];
6
- }
1
+ import { IBankLogoItem } from './IBankLogoItem';
7
2
 
8
3
  const UNKNOWN_BANK_FILE_NAME = 'unknown.svg';
9
4
 
10
- export const banksLogos: IBankLogoItem[] = [
5
+ export const banks: IBankLogoItem[] = [
11
6
  {
12
7
  fileName: 'agropromkredit_bank.png',
13
8
  humanName: 'Банк АГРОПРОМКРЕДИТ',
@@ -660,19 +655,14 @@ export const banksLogos: IBankLogoItem[] = [
660
655
  },
661
656
  ];
662
657
 
663
- export class BakLogosHelper
664
- {
665
- static getBankLogoFileName(bankName: string): string
666
- {
667
- const bankLogoItem = banksLogos.find(({ matchedBankNames }) => matchedBankNames.includes(bankName));
658
+ export const getBankLogoFileName = (bankName: string) => {
659
+ const bankLogoItem = banks.find(({ matchedBankNames }) => matchedBankNames.includes(bankName));
668
660
 
669
- return bankLogoItem?.fileName ?? UNKNOWN_BANK_FILE_NAME;
670
- }
661
+ return bankLogoItem?.fileName ?? UNKNOWN_BANK_FILE_NAME;
662
+ };
671
663
 
672
- static getBankLogoName(bankName: string): string
673
- {
674
- const bankLogoItem = banksLogos.find(({ matchedBankNames }) => matchedBankNames.includes(bankName));
664
+ export const getBankLogoName = (bankName: string): string => {
665
+ const bankLogoItem = banks.find(({ matchedBankNames }) => matchedBankNames.includes(bankName));
675
666
 
676
- return bankLogoItem?.humanName ?? bankName;
677
- }
678
- }
667
+ return bankLogoItem?.humanName ?? bankName;
668
+ };
package/package.json CHANGED
@@ -1,18 +1,12 @@
1
1
  {
2
2
  "name": "banks-helper",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Helps to work with banks names",
5
5
  "main": "index.ts",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
- "keywords": [
10
- "bank"
11
- ],
9
+ "keywords": [],
12
10
  "author": "Denis Vasilev",
13
- "license": "ISC",
14
- "files": [
15
- "index.ts",
16
- "logos"
17
- ]
11
+ "license": "ISC"
18
12
  }
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "CommonJS",
4
+ "target": "es5",
5
+ "lib": ["ES6", "ES2016"],
6
+ "sourceMap": true
7
+ },
8
+ "exclude": [
9
+ "node_modules"
10
+ ]
11
+ }