lib/assets/resources.js
function(data, type) {
			cache = {};

			// sections like "snippets" and "abbreviations" could have
			// definitions like `"f|fs": "fieldset"` which is the same as distinct
			// "f" and "fs" keys both equals to "fieldset".
			// We should parse these definitions first
			var voc = {};
			each(data, function(section, syntax) {
				var _section = {};
				each(section, function(subsection, name) {
					if (name == 'abbreviations' || name == 'snippets') {
						subsection = expandSnippetsDefinition(subsection);
					}
					_section[name] = subsection;
				});

				voc[syntax] = _section;
			});


			if (type == VOC_SYSTEM) {
				systemSettings = voc;
			} else {
				userSettings = voc;
			}
		}
function(data, type) {
			cache = {};

			// sections like "snippets" and "abbreviations" could have
			// definitions like `"f|fs": "fieldset"` which is the same as distinct
			// "f" and "fs" keys both equals to "fieldset".
			// We should parse these definitions first
			var voc = {};
			each(data, function(section, syntax) {
				var _section = {};
				each(section, function(subsection, name) {
					if (name == 'abbreviations' || name == 'snippets') {
						subsection = expandSnippetsDefinition(subsection);
					}
					_section[name] = subsection;
				});

				voc[syntax] = _section;
			});


			if (type == VOC_SYSTEM) {
				systemSettings = voc;
			} else {
				userSettings = voc;
			}
		}
function ( data , type ) { cache = { } ; // sections like "snippets" and "abbreviations" could have // definitions like `"f|fs": "fieldset"` which is the same as distinct // "f" and "fs" keys both equals to "fieldset". // We should parse these definitions first var voc = { } ; each ( data , function ( section , syntax ) { var _section = { } ; each ( section , function ( subsection , name ) { if ( name == 'abbreviations' || name == 'snippets' ) { subsection = expandSnippetsDefinition ( subsection ) ; } _section [ name ] = subsection ; } ) ; voc [ syntax ] = _section ; } ) ; if ( type == VOC_SYSTEM ) { systemSettings = voc ; } else { userSettings = voc ; } }
Sets new unparsed data for specified settings vocabulary
@param {Object} data
@param {String} type Vocabulary type ('system' or 'user')
@memberOf resources
Sets new unparsed data for specified settings vocabulary