documentid-checksum-validator
Version:
checksum validation for government doc ids
23 lines (17 loc) • 752 B
JavaScript
;
Object.defineProperty(exports, '__esModule', {
value: true
});
exports['default'] = isSupportedDocId;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _configSupportedDocIdsJs = require('../config/supportedDocIds.js');
var _configSupportedDocIdsJs2 = _interopRequireDefault(_configSupportedDocIdsJs);
function isSupportedDocId(inputCountry, inputDocName) {
var country = inputCountry.toUpperCase();
var docName = inputDocName.toLowerCase();
if (_configSupportedDocIdsJs2['default'][country] !== undefined && _configSupportedDocIdsJs2['default'][country][docName] !== undefined) {
return true;
}
return false;
}
module.exports = exports['default'];