Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export var init = function(viewModel) {
// Always ensure the user is logged in first...
// Always ignore values in this list when mapping.
ko.mapping.defaultOptions().ignore = Settings.mappingAlwaysIgnore;
// Set global URI settings.
URI.fragmentPrefix = '';
// Import static data
$(() => {
Settings.srdDataRepositoryLocations.forEach(function(location, idx, _) {
$.getJSON(location.url, function(data) {
DataRepository[location.key] = data.values;
if (location.key === 'features') {
DataRepository[location.key + 'DisplayNames'] = data.values.map(function(item, idx, _) {
return item.displayName;
});
}
});
});
});
// Run local migrations