string/toUpper.js

  1. import { toUpper as _toUpper } from 'lodash'
  2. import { convert } from 'immutadot'
  3. /**
  4. * Converts string, as a whole, to upper case just like String#toUpperCase.
  5. * @function
  6. * @memberof string
  7. * @param {Object} object The object to modify.
  8. * @param {Array|string} path The path of the property to set.
  9. * @return {Object} Returns the updated object.
  10. * @example toUpper({ nested: { a: "a string" } }, 'nested.a') // => { nested: { a: "A STRING" } }
  11. * @see {@link https://lodash.com/docs#toUpper|lodash.toUpper} for more information.
  12. * @see {@link https://mdn.io/String/toUpperCase|String.toUpperCase} for more information.
  13. * @since 1.0.0
  14. */
  15. const toUpper = convert(_toUpper)
  16. export { toUpper }