- Source:
- index.js
Methods
-
<static> bin2Hex(bin)
-
Bin to hex, like 0x7F
Parameters:
Name Type Description binBuffer - Source:
- string/bin2Hex.js
Returns:
- Type
- String
-
<static> camelCase(str)
-
Convert a string to camel case, 'fooBar'
Parameters:
Name Type Description strString - Source:
- string/camelCase.js
Returns:
- Type
- String
-
<static> compile(str [, settings])
-
Parameters:
Name Type Argument Description strString settingsObject <optional>
Template settings, https://lodash.com/docs/4.17.15#template
- Source:
- string/compile.js
Returns:
- Type
- Template
-
<static> dropIfEndsWith(str, ending)
-
Drop a right part of a string if it ends with ending
Parameters:
Name Type Description strString endingString - Source:
- string/dropIfEndsWith.js
Returns:
- Type
- String
-
<static> ensureEndsWith(str, ending)
-
Ensure a string ends with ending
Parameters:
Name Type Description strString endingString - Source:
- string/ensureEndsWith.js
Returns:
- Type
- String
-
<static> ensureStartsWith(str, starting)
-
Ensure a string starts with starting
Parameters:
Name Type Description strString startingString - Source:
- string/ensureStartsWith.js
Returns:
- Type
- String
-
<static> isQuoted(s)
-
Check a string if it is quoted with " or '
Parameters:
Name Type Description sString - Source:
- string/isQuoted.js
Returns:
- Type
- boolean
-
<static> isWrappedWith(s, q)
-
Check a string if it is started and ended with a given sub-string
Parameters:
Name Type Description sString String to check
qString Sub-srting
- Source:
- string/isWrappedWith.js
Returns:
- Type
- boolean
-
<static> kebabCase(str)
-
Convert a string to kebab case, 'foo-bar'
Parameters:
Name Type Description strString - Source:
- string/kebabCase.js
Returns:
- Type
- String
-
<static> pascalCase(str)
-
Convert a string to pascal case, 'fooBar'
Parameters:
Name Type Description strString - Source:
- string/pascalCase.js
Returns:
- Type
- String
-
<static> quote(str [, quoteChar])
-
Quote a string.
Parameters:
Name Type Argument Default Description strString quoteCharString <optional>
' - Source:
- string/quote.js
Returns:
- Type
- String
-
<static> replaceAll(str, search, replacement)
-
Replace all occurance of "search" with "replacement" in a string.
3.5x faster than String.replaceAllParameters:
Name Type Description strString searchString replacementString - Source:
- string/replaceAll.js
- See:
-
<static> snakeCase(str)
-
Convert a string to snake case, 'foo_bar'
Parameters:
Name Type Description strString - Source:
- string/snakeCase.js
Returns:
- Type
- String
-
<static> template(str, values [, settings])
-
Interpolate values
Parameters:
Name Type Argument Description strString valuesObject settingsObject <optional>
Template settings, https://lodash.com/docs/4.17.15#template
- Source:
- string/template.js
Returns:
- Type
- String
-
<static> unquote(str [, unescape] [, quoteSet])
-
Unquote a string
Parameters:
Name Type Argument Default Description strString unescapeboolean <optional>
false True to unescape slashed quote, default false
quoteSetSet | Array <optional>
Set of chars
- Source:
- string/unquote.js
Returns:
- Type
- String
-
<static> urlAppendQuery(url, query)
-
Merge the query parameters into given url.
Parameters:
Name Type Description urlString Original url.
queryObject Key-value pairs query object to be merged into the url.
- Source:
- string/urlAppendQuery.js
Returns:
- Type
- String
-
<static> urlJoin(base, extraPath, more)
-
Join base url and the extra url path.
Parameters:
Name Type Argument Description baseString extraPathString moreany <repeatable>
More path
- Source:
- string/urlJoin.js
Returns:
- Type
- String
-
<static> urlObjectToQueryString(obj)
-
Stringify an object into url query string.
Parameters:
Name Type Description objObject - Source:
- string/urlObjectToQueryString.js
Returns:
- Type
- String
-
<static> urlQueryStringToObject(qs)
-
Parse query string into key-value pairs.
Parameters:
Name Type Description qsString - Source:
- string/urlQueryStringToObject.js
Returns:
- Type
- Object