Skip to content

Commit

Permalink
expose $.camelCase()
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Oct 3, 2012
1 parent 2f8fbd3 commit 053e59e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/zepto.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ var Zepto = (function() {
return emptyArray.indexOf.call(array, elem, i)
}

$.camelCase = camelize
$.trim = function(str) { return str.trim() }

// plugin compatibility
Expand Down
7 changes: 7 additions & 0 deletions test/zepto.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ <h1>Zepto DOM unit tests</h1>
t.assertEqual("blah", " blah ".trim())
},

testCamelCase: function(t){
t.assertEqual("hello", $.camelCase("hello"))
t.assertEqual("HELLO", $.camelCase("HELLO"))
t.assertEqual("helloNiceWorld", $.camelCase("hello-nice-world"))
t.assertEqual("helloWorld", $.camelCase("helloWorld"))
},

testExtend: function(t){
t.assertSame({}, $.extend({}))
t.assertSame(
Expand Down

0 comments on commit 053e59e

Please sign in to comment.