string

Methods

(static) capitalize(object, path) → {Object}

Source:
Since:
  • 1.0.0
See:
Converts the first character of string to upper case and the remaining to lower case.
Example
capitalize({ nested: { a: "a string" } }, 'nested.a') // => { nested: { a: "A string" } }
Parameters:
Name Type Description
object Object The object to modify.
path Array | string The path of the property to set.
Returns:
Returns the updated object.
Type
Object

(static) toLower(object, path) → {Object}

Source:
Since:
  • 1.0.0
See:
Converts string, as a whole, to lower case just like String#toLowerCase.
Example
toLower({ nested: { a: "A STRING" } }, 'nested.a') // => { nested: { a: "a string" } }
Parameters:
Name Type Description
object Object The object to modify.
path Array | string The path of the property to set.
Returns:
Returns the updated object.
Type
Object

(static) toUpper(object, path) → {Object}

Source:
Since:
  • 1.0.0
See:
Converts string, as a whole, to upper case just like String#toUpperCase.
Example
toUpper({ nested: { a: "a string" } }, 'nested.a') // => { nested: { a: "A STRING" } }
Parameters:
Name Type Description
object Object The object to modify.
path Array | string The path of the property to set.
Returns:
Returns the updated object.
Type
Object