1.13.1 • Published 2 years ago

deposit-iban v1.13.1

Weekly downloads
6
License
ISC
Repository
github
Last release
2 years ago

Build Status Coverage Status

deposit-iban

A Typescript/Nodejs module that convert iranian bank deposit (account) to iban (International Bank Account Number )

Based on this Document IBAN calculation

برای تبدیل شماره حساب بانکی به شبا و برعکس (ممکن است برای حساب‌های غیرمتمرکز و وابسته به شعبه که درصد کمی از حساب‌ها را تشکیل میدهند شماره شبا به درستی محاسبه نشود)

حساب متمرکز و غیر متمرکز چیست؟

اگر شماره حساب از بانک‌های مختلف دارید لطفا ایشو کنید تا به تست‌ها اضافه شود ، و بعضی از بانک‌ها بدلیل نداشتن نمونه شماره حساب و شبا تست نشده و اضافه نشده‌اند.

Installation

npm install deposit-iban  --save

Usage

Javascript

var depositIban = require('deposit-iban');
var iban = depositIban.sepah.convertDepositToIban('1177301920207');
console.log('iban : ',iban)
var deposit = depositIban.sepah.convertIbanToDeposit('IR240150000001177301920207')
console.log('deposit : ',deposit)
var isValidIban = depositIban.util.isValidIban('IR240150000001177301920207')
console.log('isValidIban : ',isValidIban)
Output should be : 
iban : IR240150000001177301920207
deposit : 1177301920207
isValidIban : true

TypeScript

import { getBankFromCode, util } from 'deposit-iban';

// see bank codes from table below of README, 015 is sepah codeBank
const sepahBank = getBankFromCode("015")
const iban = sepahBank.convertDepositToIban('1177301920207');
console.log('iban : ',iban)
const deposit = sepahBank.convertIbanToDeposit('IR240150000001177301920207')
console.log('deposit : ',deposit)
const isValidIban = sepahBank.isValidIban('IR240150000001177301920207')
console.log('isValidIban : ',isValidIban)

OR
import { convertDepositToIban, convertIbanToDeposit } from 'deposit-iban';
const deposit = convertIbanToDeposit("IR240150000001177301920207")
console.log('deposit : ',deposit)
// see bank codes from table below of README , 015 is sepah codeBank
const iban = sepahBank.convertDepositToIban('015', '1177301920207');
console.log('iban : ',iban)
Output should be : 
iban : IR240150000001177301920207
deposit : 1177301920207
isValidIban : true

Test

npm run test

Supported banks

Bankنام فارسیCodeDeposit to ibanIban to depositIban exampleDeposit example
mellatملت012×IR6901200100000041684507964168450796
ayandeآینده062IR820620000000202102329006202102329006
saderatصادرات019IR890190000000104440444000104440444000
melliملی017IR180170000000205511280008205511280008
sepahسپه015IR9301500000013518000872011351800087201
eghtesadNovinاقتصاد نوین055IR1005503401800040682610033401-800-4068261-3
ansarانصار063IR8606303819701114100430013819-701-11410043-1
samanسامان056IR670560083204000825920001832-40-825920-1
sinaسینا059IR960590011581302697105001115-813-2697105-1
karafarinکارافرین053IR9505300000024004020646062400402064606
pasargadپاسارگاد057IR1905703905115140076600013905.115.14007660.1
tejaratتجارت018IR540180000000000166620481166620481
deyدی063IR220660000000100003532002100003532002
sarmayeسرمایه058IR5705801027800010462160011027-800-1046216-1
keshavarziکشاورزی016IR680160000000000845567398845567398
shahrشهر061IR910610000000700809045878700809045878
iranZaminایران زمین069IR450690050071000122559001500-710-122559-1
maskan014مسکن×IR84014004000001400322482214003224822
khavarMiane078خاورمیانه××
1.13.1

2 years ago

1.12.0

4 years ago

1.11.0

4 years ago

1.10.0

4 years ago

1.9.10

5 years ago

1.9.9

5 years ago

1.9.8

5 years ago

1.9.7

5 years ago

1.9.6

5 years ago

1.9.5

5 years ago

1.9.4

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.0.7

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.5

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago