e118-iin-list
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -31,3 +31,4 @@ "use strict"; | ||
}, undefined); | ||
return { | ||
const cc = parseInt(countryCode, 10); | ||
const result = { | ||
...list, | ||
@@ -37,3 +38,3 @@ [key]: [ | ||
issuerIdentifierNumber, | ||
parseInt(countryCode, 10), | ||
cc, | ||
CountryGeographicalarea[0], | ||
@@ -44,2 +45,6 @@ CompanyNameAddress[0], | ||
}; | ||
if (cc === 1) { | ||
result[`0${key}`] = result[key]; | ||
} | ||
return result; | ||
}, {}); | ||
@@ -46,0 +51,0 @@ fs.writeFileSync(target, prettier.format([ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.identifyIssuer = void 0; | ||
const Option_1 = require("fp-ts/lib/Option"); | ||
@@ -4,0 +5,0 @@ const list_1 = require("./list"); |
@@ -44,2 +44,22 @@ "use strict"; | ||
}); | ||
it('should identify US issuers which use leading 0', () => { | ||
expect(identifyIssuer_1.identifyIssuer('8901260866666666666F')).toEqual(Option_1.some({ | ||
iin: 891260, | ||
countryCode: 1, | ||
issuerIdentifierNumber: '260', | ||
countryName: 'United States', | ||
companyName: 'T-Mobile USA', | ||
companyURLs: ['http://t-mobile.com'], | ||
})); | ||
}); | ||
it('should identify US issuers without leading 0', () => { | ||
expect(identifyIssuer_1.identifyIssuer('891260866666666666F')).toEqual(Option_1.some({ | ||
iin: 891260, | ||
countryCode: 1, | ||
issuerIdentifierNumber: '260', | ||
countryName: 'United States', | ||
companyName: 'T-Mobile USA', | ||
companyURLs: ['http://t-mobile.com'], | ||
})); | ||
}); | ||
}); |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./list")); | ||
__export(require("./identifyIssuer")); | ||
__exportStar(require("./list"), exports); | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./identifyIssuer"), exports); |
{ | ||
"name": "e118-iin-list", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "List of issuer identifier numbers for the international telecommunication charge card (ITU-T E.118)", | ||
@@ -31,16 +31,16 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"fp-ts": "^2.5.4" | ||
"fp-ts": "^2.6.6" | ||
}, | ||
"devDependencies": { | ||
"@bifravst/code-style": "^7.1.10", | ||
"@commitlint/cli": "^8.3.5", | ||
"@commitlint/config-angular": "^8.3.4", | ||
"@bifravst/code-style": "^8.0.3", | ||
"@commitlint/cli": "^9.0.1", | ||
"@commitlint/config-angular": "^9.0.1", | ||
"@types/aws-sdk": "^2.7.0", | ||
"@types/jest": "^25.2.1", | ||
"@types/node": "^13.13.4", | ||
"csv-parser": "^2.3.2", | ||
"@types/jest": "^26.0.3", | ||
"@types/node": "^14.0.14", | ||
"csv-parser": "^2.3.3", | ||
"husky": "^4.2.5", | ||
"jest": "^26.0.1", | ||
"ts-jest": "^25.4.0", | ||
"typescript": "^3.8.3" | ||
"jest": "^26.1.0", | ||
"ts-jest": "^26.1.1", | ||
"typescript": "^3.9.5" | ||
}, | ||
@@ -47,0 +47,0 @@ "husky": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
789013
19718
Updatedfp-ts@^2.6.6