lib/resolver/css.js
function isSingleProperty(snippet) {
		snippet = utils.trim(snippet);
		
		// check if it doesn't contain a comment and a newline
		if (/\/\*|\n|\r/.test(snippet)) {
			return false;
		}
		
		// check if it's a valid snippet definition
		if (!/^[a-z0-9\-]+\s*\:/i.test(snippet)) {
			return false;
		}
		
		return snippet.replace(/\$\{.+?\}/g, '').split(':').length == 2;
	}
function isSingleProperty(snippet) {
		snippet = utils.trim(snippet);
		
		// check if it doesn't contain a comment and a newline
		if (/\/\*|\n|\r/.test(snippet)) {
			return false;
		}
		
		// check if it's a valid snippet definition
		if (!/^[a-z0-9\-]+\s*\:/i.test(snippet)) {
			return false;
		}
		
		return snippet.replace(/\$\{.+?\}/g, '').split(':').length == 2;
	}
function isSingleProperty ( snippet ) { snippet = utils . trim ( snippet ) ; // check if it doesn't contain a comment and a newline if ( / \/\*|\n|\r / . test ( snippet ) ) { return false ; } // check if it's a valid snippet definition if ( ! / ^[a-z0-9\-]+\s*\: / i . test ( snippet ) ) { return false ; } return snippet . replace ( / \$\{.+?\} / g , '' ) . split ( ':' ) . length == 2 ; }
Check if provided snippet contains only one CSS property and value.
@param {String} snippet
@returns {Boolean}
Check if provided snippet contains only one CSS property and value .