prop_parse no longer scans the string twice
The performance impact is negligable in either case.perfodd
parent
72da8f2dee
commit
16d0641f46
|
@ -51,12 +51,10 @@ exports.parseKeywords = function ( prop )
|
|||
|
||||
prop = ''+( prop );
|
||||
|
||||
// only perform parsing if the string contains a space
|
||||
if ( / /.test( prop ) )
|
||||
{
|
||||
// the keywords are all words, except for the last, which is the
|
||||
// property name
|
||||
keywords = prop.split( /\s+/ );
|
||||
if ( ( keywords = prop.split( /\s+/ ) ).length !== 1 )
|
||||
{
|
||||
name = keywords.pop();
|
||||
|
||||
var i = keywords.length,
|
||||
|
|
Loading…
Reference in New Issue