Comparing version 1.4.0 to 1.5.0
@@ -99,3 +99,3 @@ /*! | ||
*/ | ||
export declare function electonicFormatIBAN(iban: string): string; | ||
export declare function electronicFormatIBAN(iban: string): string; | ||
/** | ||
@@ -106,6 +106,6 @@ * Get IBAN in friendly format (separated after every 4 characters) | ||
* // returns 'NL91 ABNA 0417 1643 00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300'); | ||
* @example | ||
* // returns 'NL91-ABNA-0417-1643-00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300','-'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300','-'); | ||
* @alias module:ibantools.friendlyFormatIBAN | ||
@@ -112,0 +112,0 @@ * @param {string} IBAN IBAN |
@@ -11,3 +11,3 @@ /*! | ||
* @see module:ibantools | ||
* @version 1.4.0 | ||
* @version 1.5.0 | ||
* @license MPL-2.0 | ||
@@ -36,3 +36,3 @@ */ | ||
if (iban !== undefined && iban !== null) { | ||
var tmpIban = electonicFormatIBAN(iban); | ||
var tmpIban = electronicFormatIBAN(iban); | ||
var spec = countrySpecs[tmpIban.slice(0, 2)]; | ||
@@ -68,3 +68,3 @@ if (spec !== undefined && | ||
countryCode !== undefined && countryCode !== null) { | ||
var tmpBban = electonicFormatIBAN(bban); | ||
var tmpBban = electronicFormatIBAN(bban); | ||
var spec = countrySpecs[countryCode]; | ||
@@ -90,3 +90,3 @@ if (spec !== undefined && | ||
function composeIBAN(params) { | ||
var bban = electonicFormatIBAN(params.bban); | ||
var bban = electronicFormatIBAN(params.bban); | ||
var spec = countrySpecs[params.countryCode]; | ||
@@ -114,3 +114,3 @@ if (bban !== null && | ||
var result = {}; | ||
iban = electonicFormatIBAN(iban); | ||
iban = electronicFormatIBAN(iban); | ||
if (isValidIBAN(iban)) { | ||
@@ -149,3 +149,3 @@ result.bban = iban.slice(4); | ||
*/ | ||
function electonicFormatIBAN(iban) { | ||
function electronicFormatIBAN(iban) { | ||
if (iban === undefined || iban === null) { | ||
@@ -156,3 +156,3 @@ return null; | ||
} | ||
exports.electonicFormatIBAN = electonicFormatIBAN; | ||
exports.electronicFormatIBAN = electronicFormatIBAN; | ||
/** | ||
@@ -163,6 +163,6 @@ * Get IBAN in friendly format (separated after every 4 characters) | ||
* // returns 'NL91 ABNA 0417 1643 00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300'); | ||
* @example | ||
* // returns 'NL91-ABNA-0417-1643-00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300','-'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300','-'); | ||
* @alias module:ibantools.friendlyFormatIBAN | ||
@@ -177,3 +177,3 @@ * @param {string} IBAN IBAN | ||
} | ||
return electonicFormatIBAN(iban).replace(/(.{4})(?!$)/g, "$1" + separator); | ||
return electronicFormatIBAN(iban).replace(/(.{4})(?!$)/g, "$1" + separator); | ||
} | ||
@@ -180,0 +180,0 @@ exports.friendlyFormatIBAN = friendlyFormatIBAN; |
@@ -11,3 +11,3 @@ /*! | ||
* @see module:ibantools | ||
* @version 1.4.0 | ||
* @version 1.5.0 | ||
* @license MPL-2.0 | ||
@@ -35,3 +35,3 @@ */ | ||
if (iban !== undefined && iban !== null) { | ||
var tmpIban = electonicFormatIBAN(iban); | ||
var tmpIban = electronicFormatIBAN(iban); | ||
var spec = countrySpecs[tmpIban.slice(0, 2)]; | ||
@@ -66,3 +66,3 @@ if (spec !== undefined && | ||
countryCode !== undefined && countryCode !== null) { | ||
var tmpBban = electonicFormatIBAN(bban); | ||
var tmpBban = electronicFormatIBAN(bban); | ||
var spec = countrySpecs[countryCode]; | ||
@@ -87,3 +87,3 @@ if (spec !== undefined && | ||
export function composeIBAN(params) { | ||
var bban = electonicFormatIBAN(params.bban); | ||
var bban = electronicFormatIBAN(params.bban); | ||
var spec = countrySpecs[params.countryCode]; | ||
@@ -110,3 +110,3 @@ if (bban !== null && | ||
var result = {}; | ||
iban = electonicFormatIBAN(iban); | ||
iban = electronicFormatIBAN(iban); | ||
if (isValidIBAN(iban)) { | ||
@@ -144,3 +144,3 @@ result.bban = iban.slice(4); | ||
*/ | ||
export function electonicFormatIBAN(iban) { | ||
export function electronicFormatIBAN(iban) { | ||
if (iban === undefined || iban === null) { | ||
@@ -156,6 +156,6 @@ return null; | ||
* // returns 'NL91 ABNA 0417 1643 00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300'); | ||
* @example | ||
* // returns 'NL91-ABNA-0417-1643-00' | ||
* ibantools.electronicFormatIBAN('NL91ABNA0417164300','-'); | ||
* ibantools.friendlyFormatIBAN('NL91ABNA0417164300','-'); | ||
* @alias module:ibantools.friendlyFormatIBAN | ||
@@ -170,3 +170,3 @@ * @param {string} IBAN IBAN | ||
} | ||
return electonicFormatIBAN(iban).replace(/(.{4})(?!$)/g, "$1" + separator); | ||
return electronicFormatIBAN(iban).replace(/(.{4})(?!$)/g, "$1" + separator); | ||
} | ||
@@ -173,0 +173,0 @@ /** |
{ | ||
"name": "ibantools", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff", | ||
@@ -53,3 +53,4 @@ "keywords": [ | ||
"cheerio": "^0.22", | ||
"coveralls": "^2.13", | ||
"coveralls": "^3.0", | ||
"docdash": "^0.4.0", | ||
"gulp": "^3.9", | ||
@@ -56,0 +57,0 @@ "gulp-mocha": "^4.3", |
@@ -75,6 +75,6 @@ # IBANTools | ||
This project adheres to the Contributor Covenant [code of conduct](.github/CODE_OF_CONDUCT.md). | ||
This project adheres to the Contributor Covenant [code of conduct](https://github.com/Simplify/ibantools/blob/master/.github/CODE_OF_CONDUCT.md). | ||
By participating, you are expected to uphold this code. | ||
For contribution details, please read [this document](CONTRIBUTING.md). | ||
For contribution details, please read [this document](https://github.com/Simplify/ibantools/blob/master/CONTRIBUTING.md). | ||
@@ -81,0 +81,0 @@ ## License |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62735
25