Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / capitalize.js
diff --git a/node_modules/uncss/node_modules/lodash/capitalize.js b/node_modules/uncss/node_modules/lodash/capitalize.js
new file mode 100644 (file)
index 0000000..4daec03
--- /dev/null
@@ -0,0 +1,22 @@
+var toString = require('./toString'),
+    upperFirst = require('./upperFirst');
+
+/**
+ * Converts the first character of `string` to upper case and the remaining
+ * to lower case.
+ *
+ * @static
+ * @memberOf _
+ * @category String
+ * @param {string} [string=''] The string to capitalize.
+ * @returns {string} Returns the capitalized string.
+ * @example
+ *
+ * _.capitalize('FRED');
+ * // => 'Fred'
+ */
+function capitalize(string) {
+  return upperFirst(toString(string).toLowerCase());
+}
+
+module.exports = capitalize;