<commit_before>/// <reference path="ParameterValuesTemplate.ts"/>
/// <reference path="ParameterModelItem.ts"/> 
module ParameterValueManager{
	import paramValues = ParameterValuesTemplate;
	
	export function generateJSON(parameterModelItems: ParameterModelItem[]){		
		var template = new paramValues.DeploymentParameters();
		template.$schema = "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json";
		template.contentVersion = "1.0.0.0";
		template.parameters = {p: paramValues.Parameter};
		parameterModelItems.forEach(param =>{
			template.parameters[param.name] = new paramValues.Parameter(param.value);
		})
		
		var json = JSON.stringify(template);
		
		 var blob = new Blob([json], {type: 'text/json'}),
            e    = document.createEvent('MouseEvents'),
            a    = document.createElement('a')
      
        //A typescript guru could probably figure out how to get rid of these errors
      
        a.download = 'ARMTemplate.params.json';
        a.href = window.URL.createObjectURL(blob);
        a.dataset.downloadurl =  ['text/json', a.download, a.href].join(':');
        e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
        a.dispatchEvent(e);	
	}
}<commit_msg>Better formatting when exporting the parameters JSON<commit_after>/// <reference path="ParameterValuesTemplate.ts"/>
/// <reference path="ParameterModelItem.ts"/> 
module ParameterValueManager{
	import paramValues = ParameterValuesTemplate;
	
	export function generateJSON(parameterModelItems: ParameterModelItem[]){		
		var template = new paramValues.DeploymentParameters();
		template.$schema = "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentParameters.json";
		template.contentVersion = "1.0.0.0";
		template.parameters = {p: paramValues.Parameter};
		parameterModelItems.forEach(param =>{
			template.parameters[param.name] = new paramValues.Parameter(param.value);
		})
		
		var json = JSON.stringify(template, null, 2);
		
		 var blob = new Blob([json], {type: 'text/json'}),
            e    = document.createEvent('MouseEvents'),
            a    = document.createElement('a')
      
        //A typescript guru could probably figure out how to get rid of these errors
      
        a.download = 'ARMTemplate.params.json';
        a.href = window.URL.createObjectURL(blob);
        a.dataset.downloadurl =  ['text/json', a.download, a.href].join(':');
        e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
        a.dispatchEvent(e);	
	}
}
{'fraction_non_alphanumeric': 0.1388036809815951, 'fraction_numerical': 0.014187116564417178, 'mean_word_length': 3.585237258347979, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6015720', 'n_tokens_mistral': 805, 'n_tokens_neox': 742, 'n_words': 168}