Commit Graph

9 Commits

Author SHA1 Message Date
coyotte508
6bcd62eefb Merge pull request #1 from coyotte508/patch-3
Patch 3
2018-03-14 09:32:48 +01:00
coyotte508
d06ca98a8d Update iban-tests.ts 2018-03-14 09:31:28 +01:00
coyotte508
5a699e4e04 iban - Fix incorrect function signatures
Here is the code for the two functions of iban@1.3.0:

https://github.com/arhs/iban.js/blob/master/iban.js#L359

    /**
     * Convert an IBAN to a BBAN.
     *
     * @param iban
     * @param {String} [separator] the separator to use between the blocks of the BBAN, defaults to ' '
     * @returns {string|*}
     */
    exports.toBBAN = function(iban, separator){
        if (typeof separator == 'undefined'){
            separator = ' ';
        }
        iban = electronicFormat(iban);
        var countryStructure = countries[iban.slice(0,2)];
        if (!countryStructure) {
            throw new Error('No country with code ' + iban.slice(0,2));
        }
        return countryStructure.toBBAN(iban, separator);
    };

    exports.printFormat = function(iban, separator){
        if (typeof separator == 'undefined'){
            separator = ' ';
        }
        return electronicFormat(iban).replace(EVERY_FOUR_CHARS, "$1" + separator);
    };
2018-03-13 14:27:50 +01:00
Andy Hanson
45c9246c09 Remove esModuleInterop from tsconfigs (no longer mandatory) 2018-02-14 14:55:13 -08:00
Andy
bef4d2b27d Enable "esModuleInterop" in all tsconfigs (#23354) 2018-02-05 11:01:56 -08:00
Andy
19f89399e4 Ensure every package has a tslint.json (#21009)
* Ensure every package has a tslint.json

* Fixes
2017-10-25 11:13:50 -07:00
Andy
947a8fb761 Enable strictFunctionTypes (#20373) 2017-10-06 14:03:03 -07:00
Andy
924fafffc0 Fix remaining lint errors (#19166) 2017-08-20 15:37:53 -07:00
Andy Hanson
354cec620d Move all packages to a types directory 2017-03-24 14:27:52 -07:00