Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ibankit

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ibankit - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

4

lib/ibanUtil.d.ts

@@ -21,4 +21,4 @@ import { CountryCode } from "./country";

export declare function replaceCheckDigit(iban: string, checkDigit: string): string;
export declare function toFormattedString(iban: string, seperator?: string): string;
export declare function toFormattedStringBBAN(iban: string, seperator?: string): string;
export declare function toFormattedString(iban: string, separator?: string): string;
export declare function toFormattedStringBBAN(iban: string, separator?: string): string;
export declare function validateCheckDigit(iban: string): void;

@@ -105,9 +105,9 @@ "use strict";

exports.replaceCheckDigit = replaceCheckDigit;
function toFormattedString(iban, seperator) {
if (seperator === void 0) { seperator = " "; }
return iban.replace(/(.{4})/g, "$1" + seperator).trim();
function toFormattedString(iban, separator) {
if (separator === void 0) { separator = " "; }
return iban.replace(/(.{4})/g, "$1" + separator).trim();
}
exports.toFormattedString = toFormattedString;
function toFormattedStringBBAN(iban, seperator) {
if (seperator === void 0) { seperator = " "; }
function toFormattedStringBBAN(iban, separator) {
if (separator === void 0) { separator = " "; }
var structure = getBbanStructure(iban);

@@ -120,3 +120,3 @@ if (structure === null) {

var value = structure.extractValue(bban, part.getPartType());
return acc.concat(value || "", part.trailingSeperator ? seperator : "");
return acc.concat(value || "", part.trailingSeparator ? separator : "");
}, []);

@@ -123,0 +123,0 @@ parts.pop();

@@ -23,14 +23,14 @@ import { BbanStructure } from "./bbanStructure";

private length;
trailingSeperator: boolean;
trailingSeparator: boolean;
generate: GenerateValue;
hasGenerator: boolean;
private constructor();
static bankCode(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static branchCode(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static accountNumber(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static nationalCheckDigit(length: number, characterType: CharacterType, generate?: GenerateValue, trailingSeperator?: boolean): BbanStructurePart;
static accountType(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static currencyType(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static ownerAccountNumber(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static identificationNumber(length: number, characterType: CharacterType, trailingSeperator?: boolean): BbanStructurePart;
static bankCode(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static branchCode(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static accountNumber(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static nationalCheckDigit(length: number, characterType: CharacterType, generate?: GenerateValue, trailingSeparator?: boolean): BbanStructurePart;
static accountType(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static currencyType(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static ownerAccountNumber(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
static identificationNumber(length: number, characterType: CharacterType, trailingSeparator?: boolean): BbanStructurePart;
getPartType(): PartType;

@@ -37,0 +37,0 @@ getCharacterType(): CharacterType;

@@ -36,3 +36,3 @@ "use strict";

var BbanStructurePart = (function () {
function BbanStructurePart(entryType, characterType, length, trailingSeperator, generate) {
function BbanStructurePart(entryType, characterType, length, trailingSeparator, generate) {
this.entryType = entryType;

@@ -43,35 +43,35 @@ this.characterType = characterType;

this.hasGenerator = !!generate;
this.trailingSeperator = trailingSeperator;
this.trailingSeparator = trailingSeparator;
}
BbanStructurePart.bankCode = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = true; }
return new BbanStructurePart(PartType.BANK_CODE, characterType, length, trailingSeperator);
BbanStructurePart.bankCode = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = true; }
return new BbanStructurePart(PartType.BANK_CODE, characterType, length, trailingSeparator);
};
BbanStructurePart.branchCode = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = true; }
return new BbanStructurePart(PartType.BRANCH_CODE, characterType, length, trailingSeperator);
BbanStructurePart.branchCode = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = true; }
return new BbanStructurePart(PartType.BRANCH_CODE, characterType, length, trailingSeparator);
};
BbanStructurePart.accountNumber = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = true; }
return new BbanStructurePart(PartType.ACCOUNT_NUMBER, characterType, length, trailingSeperator);
BbanStructurePart.accountNumber = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = true; }
return new BbanStructurePart(PartType.ACCOUNT_NUMBER, characterType, length, trailingSeparator);
};
BbanStructurePart.nationalCheckDigit = function (length, characterType, generate, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = false; }
return new BbanStructurePart(PartType.NATIONAL_CHECK_DIGIT, characterType, length, trailingSeperator, generate);
BbanStructurePart.nationalCheckDigit = function (length, characterType, generate, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = false; }
return new BbanStructurePart(PartType.NATIONAL_CHECK_DIGIT, characterType, length, trailingSeparator, generate);
};
BbanStructurePart.accountType = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = false; }
return new BbanStructurePart(PartType.ACCOUNT_TYPE, characterType, length, trailingSeperator);
BbanStructurePart.accountType = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = false; }
return new BbanStructurePart(PartType.ACCOUNT_TYPE, characterType, length, trailingSeparator);
};
BbanStructurePart.currencyType = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = false; }
return new BbanStructurePart(PartType.CURRENCY_TYPE, characterType, length, trailingSeperator);
BbanStructurePart.currencyType = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = false; }
return new BbanStructurePart(PartType.CURRENCY_TYPE, characterType, length, trailingSeparator);
};
BbanStructurePart.ownerAccountNumber = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = true; }
return new BbanStructurePart(PartType.OWNER_ACCOUNT_NUMBER, characterType, length, trailingSeperator);
BbanStructurePart.ownerAccountNumber = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = true; }
return new BbanStructurePart(PartType.OWNER_ACCOUNT_NUMBER, characterType, length, trailingSeparator);
};
BbanStructurePart.identificationNumber = function (length, characterType, trailingSeperator) {
if (trailingSeperator === void 0) { trailingSeperator = true; }
return new BbanStructurePart(PartType.IDENTIFICATION_NUMBER, characterType, length, trailingSeperator);
BbanStructurePart.identificationNumber = function (length, characterType, trailingSeparator) {
if (trailingSeparator === void 0) { trailingSeparator = true; }
return new BbanStructurePart(PartType.IDENTIFICATION_NUMBER, characterType, length, trailingSeparator);
};

@@ -78,0 +78,0 @@ BbanStructurePart.prototype.getPartType = function () {

{
"name": "ibankit",
"version": "1.2.1",
"version": "1.2.2",
"description": "Validation, field extraction and creation of IBAN, BBAN, BIC numbers",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -261,3 +261,3 @@ import * as ibanUtil from "./ibanUtil";

/**
* IBAN Validation testing [iban-js API compatability]
* IBAN Validation testing [iban-js API compatibility]
*

@@ -277,3 +277,3 @@ * @param {string} iban

/**
* Convert an IBAN to a formatted BBAN - with validation[iban-js API compatability]
* Convert an IBAN to a formatted BBAN - with validation[iban-js API compatibility]
*

@@ -311,3 +311,3 @@ * @param {string} iban

/**
* Check the validity of the passed BBAN. [iban-js API compatability]
* Check the validity of the passed BBAN. [iban-js API compatibility]
*

@@ -327,3 +327,3 @@ * @param countryCode the country of the BBAN

/**
* Standard print format of an IBAN, no validation is performed [iban-js API compatability]
* Standard print format of an IBAN, no validation is performed [iban-js API compatibility]
*

@@ -339,3 +339,3 @@ * @param iban

/**
* Electronic format of the IBAN, no validation is performed. [iban-js API compatability]
* Electronic format of the IBAN, no validation is performed. [iban-js API compatibility]
*

@@ -342,0 +342,0 @@ * @param iban

@@ -262,5 +262,5 @@ import { CountryCode, countryByCode } from "./country";

iban: string,
seperator: string = " ",
separator: string = " ",
): string {
return iban.replace(/(.{4})/g, `$1${seperator}`).trim();
return iban.replace(/(.{4})/g, `$1${separator}`).trim();
}

@@ -274,3 +274,3 @@

iban: string,
seperator: string = " ",
separator: string = " ",
): string {

@@ -288,7 +288,7 @@ const structure = getBbanStructure(iban);

return acc.concat(value || "", part.trailingSeperator ? seperator : "");
return acc.concat(value || "", part.trailingSeparator ? separator : "");
},
[] as string[],
);
parts.pop(); // Don't care about last seperator
parts.pop(); // Don't care about last separator

@@ -295,0 +295,0 @@ return parts.join("");

@@ -59,3 +59,3 @@ import { randInt } from "./randInt";

private length: number;
trailingSeperator: boolean;
trailingSeparator: boolean;
generate: GenerateValue;

@@ -68,3 +68,3 @@ hasGenerator: boolean;

length: number,
trailingSeperator: boolean,
trailingSeparator: boolean,
generate?: GenerateValue,

@@ -77,3 +77,3 @@ ) {

this.hasGenerator = !!generate;
this.trailingSeperator = trailingSeperator;
this.trailingSeparator = trailingSeparator;
}

@@ -84,3 +84,3 @@

characterType: CharacterType,
trailingSeperator: boolean = true,
trailingSeparator: boolean = true,
): BbanStructurePart {

@@ -91,3 +91,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -99,3 +99,3 @@ }

characterType: CharacterType,
trailingSeperator: boolean = true,
trailingSeparator: boolean = true,
): BbanStructurePart {

@@ -106,3 +106,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -114,3 +114,3 @@ }

characterType: CharacterType,
trailingSeperator: boolean = true,
trailingSeparator: boolean = true,
): BbanStructurePart {

@@ -121,3 +121,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -130,3 +130,3 @@ }

generate?: GenerateValue,
trailingSeperator: boolean = false,
trailingSeparator: boolean = false,
): BbanStructurePart {

@@ -137,3 +137,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
generate,

@@ -146,3 +146,3 @@ );

characterType: CharacterType,
trailingSeperator: boolean = false,
trailingSeparator: boolean = false,
): BbanStructurePart {

@@ -153,3 +153,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -161,3 +161,3 @@ }

characterType: CharacterType,
trailingSeperator: boolean = false,
trailingSeparator: boolean = false,
): BbanStructurePart {

@@ -168,3 +168,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -176,3 +176,3 @@ }

characterType: CharacterType,
trailingSeperator: boolean = true,
trailingSeparator: boolean = true,
): BbanStructurePart {

@@ -183,3 +183,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -191,3 +191,3 @@ }

characterType: CharacterType,
trailingSeperator: boolean = true,
trailingSeparator: boolean = true,
): BbanStructurePart {

@@ -198,3 +198,3 @@ return new BbanStructurePart(

length,
trailingSeperator,
trailingSeparator,
);

@@ -201,0 +201,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc