@@ -12,23 +12,27 @@ var cancelFrame = frame.cancel,
1212
1313var prime = require ( "prime" )
1414
15- var camelize = require ( "prime /string/camelize " ) ,
16- clean = require ( "prime /string/clean " ) ,
17- capitalize = require ( "prime /string/capitalize " ) ,
18- hyphenateString = require ( "prime /string/hyphenate" )
15+ var camelCase = require ( "mout /string/camelCase " ) ,
16+ trim = require ( "mout /string/trim " ) ,
17+ properCase = require ( "mout /string/properCase " ) ,
18+ hyphenateString = require ( "mout /string/hyphenate" )
1919
20- var map = require ( "prime /array/map" ) ,
21- forEach = require ( "prime /array/forEach" ) ,
22- indexOf = require ( "prime /array/indexOf" )
20+ var map = require ( "mout /array/map" ) ,
21+ forEach = require ( "mout /array/forEach" ) ,
22+ indexOf = require ( "mout /array/indexOf" )
2323
2424var elements = require ( "elements" )
2525
2626var fx = require ( "./fx" )
2727
2828// util
2929
30+ var clean = function ( str ) {
31+ return trim ( str ) . replace ( / \s + / g, " " )
32+ }
33+
3034var matchString = function ( s , r ) {
31- return String . prototype . match . call ( s , r ) ;
35+ return String . prototype . match . call ( s , r )
3236}
3337
3438var hyphenated = { }
@@ -50,7 +54,7 @@ var compute = global.getComputedStyle ? function(node){
5054} : /*(css3)?*/ function ( node ) {
5155 var cts = node . currentStyle
5256 return function ( property ) {
53- return cts ? cts [ camelize ( property ) ] : ""
57+ return cts ? cts [ camelCase ( property ) ] : ""
5458 }
5559} /*:null*/
5660
@@ -366,7 +370,7 @@ forEach(['Webkit', "Moz", "ms", "O", null], function(prefix){
366370 forEach ( [
367371 "transition" , "transform" , "transformOrigin" , "transformStyle" , "perspective" , "perspectiveOrigin" , "backfaceVisibility"
368372 ] , function ( style ) {
369- var cc = prefix ? prefix + capitalize ( style ) : style
373+ var cc = prefix ? prefix + properCase ( style ) : style
370374 if ( prefix === "ms" ) hyphenated [ cc ] = "-ms-" + hyphenate ( style )
371375 if ( test . style [ cc ] != null ) aliases [ style ] = cc
372376 } )
@@ -865,7 +869,7 @@ elements.implement({
865869 for ( var property in styles ) {
866870
867871 var value = styles [ property ] ,
868- property = camelize ( property )
872+ property = camelCase ( property )
869873
870874 this . forEach ( function ( node ) {
871875 length ++
@@ -892,7 +896,7 @@ elements.implement({
892896
893897 for ( var property in styles ) {
894898 var value = styles [ property ] ,
895- set = setter ( property = camelize ( property ) )
899+ set = setter ( property = camelCase ( property ) )
896900
897901 this . forEach ( function ( node ) {
898902 var self = elements ( node ) , anims = self . _animations , anim
@@ -907,7 +911,7 @@ elements.implement({
907911
908912 compute : function ( property ) {
909913
910- property = camelize ( property )
914+ property = camelCase ( property )
911915 var node = this [ 0 ]
912916
913917 // return default matrix for transform, instead of parsed (for consistency)
@@ -927,7 +931,7 @@ elements.implement({
927931} )
928932
929933moofx . parse = function ( property , value , normalize ) {
930- return ( parsers [ camelize ( property ) ] || parse ) ( value , normalize )
934+ return ( parsers [ camelCase ( property ) ] || parse ) ( value , normalize )
931935}
932936
933937module . exports = moofx
0 commit comments