lib/resolver/css.js
function(abbr) {
			if (abbr.charAt(0) != '-') {
				return {
					property: abbr,
					prefixes: null
				};
			}
			
			// abbreviation may either contain sequence of one-character prefixes
			// or just dash, meaning that user wants to produce all possible
			// prefixed properties
			var i = 1, il = abbr.length, ch;
			var prefixes = [];
			
			while (i < il) {
				ch = abbr.charAt(i);
				if (ch == '-') {
					// end-sequence character found, stop searching
					i++;
					break;
				}
				
				if (ch in vendorPrefixes) {
					prefixes.push(ch);
				} else {
					// no prefix found, meaning user want to produce all
					// vendor-prefixed properties
					prefixes.length = 0;
					i = 1;
					break;
				}
				
				i++;
			}
			
			// reached end of abbreviation and no property name left
			if (i == il -1) {
				i = 1;
				prefixes.length = 1;
			}
			
			return {
				property: abbr.substring(i),
				prefixes: prefixes.length ? prefixes : 'all'
			};
		}
function(abbr) {
			if (abbr.charAt(0) != '-') {
				return {
					property: abbr,
					prefixes: null
				};
			}
			
			// abbreviation may either contain sequence of one-character prefixes
			// or just dash, meaning that user wants to produce all possible
			// prefixed properties
			var i = 1, il = abbr.length, ch;
			var prefixes = [];
			
			while (i < il) {
				ch = abbr.charAt(i);
				if (ch == '-') {
					// end-sequence character found, stop searching
					i++;
					break;
				}
				
				if (ch in vendorPrefixes) {
					prefixes.push(ch);
				} else {
					// no prefix found, meaning user want to produce all
					// vendor-prefixed properties
					prefixes.length = 0;
					i = 1;
					break;
				}
				
				i++;
			}
			
			// reached end of abbreviation and no property name left
			if (i == il -1) {
				i = 1;
				prefixes.length = 1;
			}
			
			return {
				property: abbr.substring(i),
				prefixes: prefixes.length ? prefixes : 'all'
			};
		}
function ( abbr ) { if ( abbr . charAt ( 0 ) != '-' ) { return { property : abbr , prefixes : null } ; } // abbreviation may either contain sequence of one-character prefixes // or just dash, meaning that user wants to produce all possible // prefixed properties var i = 1 , il = abbr . length , ch ; var prefixes = [ ] ; while ( i < il ) { ch = abbr . charAt ( i ) ; if ( ch == '-' ) { // end-sequence character found, stop searching i ++ ; break ; } if ( ch in vendorPrefixes ) { prefixes . push ( ch ) ; } else { // no prefix found, meaning user want to produce all // vendor-prefixed properties prefixes . length = 0 ; i = 1 ; break ; } i ++ ; } // reached end of abbreviation and no property name left if ( i == il - 1 ) { i = 1 ; prefixes . length = 1 ; } return { property : abbr . substring ( i ) , prefixes : prefixes . length ? prefixes : 'all' } ; }
Extract vendor prefixes from abbreviation
@param {String} abbr
@returns {Object} Object containing array of prefixes and clean
abbreviation name
Extract vendor prefixes from abbreviation