Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F25243290
ucfirst.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
423 B
Referenced Files
None
Subscribers
None
ucfirst.js
View Options
/**
* Handlebars helper to capitalize.
*
* @param {string} str - The string to capitalize the first character
* @example
* {{ucfirst foo}}
* @returns string The string capitalized
*/
module
.
exports
=
function
(
str
)
{
if
(
str
&&
typeof
str
===
"string"
)
{
return
str
.
charAt
(
0
).
toUpperCase
()
+
str
.
slice
(
1
);
}
console
.
warn
(
"helpers: ucfirst called with a non string parameter."
);
return
''
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 01:42 (4 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3601633
Default Alt Text
ucfirst.js (423 B)
Attached To
Mode
rVIPERWWW Dæghrefn website
Attached
Detach File
Event Timeline
Log In to Comment