The string to convert.
Returns the camel cased string.
Converts the first character of string to upper case and the remaining to lower case.
The string to capitalize.
Returns the capitalized string.
Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining diacritical marks.
The string to deburr.
Returns the deburred string.
Checks if string ends with the given target string.
The string to search.
The string to search for.
The position to search from.
Returns true if string ends with target, else false.
Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
Note: No other characters are escaped. To escape additional characters use a third-party library like he.
hough the ">" character is escaped for symmetry, characters like ">" and "/" don’t need escaping in HTML and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynens’s article (under "semi-related fun fact") for more details.
Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
#102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
When working with HTML you should always quote attribute values to reduce XSS vectors.
The string to escape.
Returns the escaped string.
Escapes the RegExp special characters "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", and "|" in string.
The string to escape.
Returns the escaped string.
Converts string to kebab case.
The string to convert.
Returns the kebab cased string.
Converts string
, as space separated words, to lower case.
The string to convert.
Returns the lower cased string.
Converts the first character of string
to lower case.
The string to convert.
Returns the converted string.
Pads string on the left and right sides if it’s shorter than length. Padding characters are truncated if they can’t be evenly divided by length.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Pads string on the right side if it’s shorter than length. Padding characters are truncated if they exceed length.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Pads string on the left side if it’s shorter than length. Padding characters are truncated if they exceed length.
The string to pad.
The padding length.
The string used as padding.
Returns the padded string.
Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used unless value is a hexadecimal, in which case a radix of 16 is used.
Note: This method aligns with the ES5 implementation of parseInt.
The string to convert.
The radix to interpret value by.
Returns the converted integer.
Repeats the given string n times.
The string to repeat.
The number of times to repeat the string.
Returns the repeated string.
Replaces matches for pattern in string with replacement.
Note: This method is based on String#replace.
Returns the modified string.
Converts string to snake case.
The string to convert.
Returns the snake cased string.
Splits string by separator.
Note: This method is based on String#split.
The string to trim.
The separator pattern to split by.
The length to truncate results to.
Returns the new array of string segments.
Splits string by separator.
Note: This method is based on String#split.
The string to trim.
Not used in this overload.
Enables use as an iteratee for methods like _.map. You should not pass this parameter directly in your code.
Returns the new array of string segments.
Converts string to start case.
The string to convert.
Returns the start cased string.
Checks if string starts with the given target string.
The string to search.
The string to search for.
The position to search from.
Returns true if string starts with target, else false.
Creates a compiled template function that can interpolate data properties in "interpolate" delimiters, HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data properties may be accessed as free variables in the template. If a setting object is provided it takes precedence over _.templateSettings values.
Note: In the development build _.template utilizes sourceURLs for easier debugging.
For more information on precompiling templates see lodash's custom builds documentation.
For more information on Chrome extension sandboxes see Chrome's extensions documentation.
The template string.
The options object.
Returns the compiled template function.
Converts string
, as a whole, to lower case.
The string to convert.
Returns the lower cased string.
Converts string
, as a whole, to upper case.
The string to convert.
Returns the upper cased string.
Removes leading and trailing whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Removes leading and trailing whitespace or specified characters from string.
The string to trim.
Not used in this overload.
Enables use as an iteratee for methods like _.map. You should not pass this parameter directly in your code.
Returns the trimmed string.
Removes trailing whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Removes trailing whitespace or specified characters from string.
The string to trim.
Not used in this overload.
Enables use as an iteratee for methods like _.map. You should not pass this parameter directly in your code.
Returns the trimmed string.
Removes leading whitespace or specified characters from string.
The string to trim.
The characters to trim.
Returns the trimmed string.
Removes leading whitespace or specified characters from string.
The string to trim.
Not used in this overload.
Enables use as an iteratee for methods like _.map. You should not pass this parameter directly in your code.
Returns the trimmed string.
Truncates string if it’s longer than the given maximum string length. The last characters of the truncated string are replaced with the omission string which defaults to "…".
The string to truncate.
The options object or maximum string length.
Returns the truncated string.
The inverse of _.escape; this method converts the HTML entities &, <, >, ", ', and ` in string to their corresponding characters.
Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library like he.
The string to unescape.
Returns the unescaped string.
Converts string
, as space separated words, to upper case.
The string to convert.
Returns the upper cased string.
Converts the first character of string
to upper case.
The string to convert.
Returns the converted string.
Splits string
into an array of its words.
The string to inspect.
The pattern to match words.
Returns the words of string
.
Splits string
into an array of its words.
The string to inspect.
Not used in this overload.
Enables use as an iteratee for methods like _.map. You should not pass this parameter directly in your code.
Returns the words of string
.
Generated using TypeDoc
Converts string to camel case.