Created
November 27, 2013 01:55
-
-
Save nidhhoggr/7669511 to your computer and use it in GitHub Desktop.
underscore titleize humanize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
// Import Underscore.string to separate object, because there are conflict functions (include, reverse, contains) | |
_.str = require('underscore.string'); | |
// Mix in non-conflict functions to Underscore namespace if you want | |
_.mixin(_.str.exports()); | |
// All functions, include conflict, will be available through _.str object | |
_.str.include('Underscore.string', 'string'); // => true | |
console.log(_.str.titleize( | |
_.str.humanize("test_titleize_humanize") | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment