string/toUpperCase.js

  1. import { convertStringMethod } from './convertStringMethod'
  2. /**
  3. * Replaces by former string in upper case.
  4. * @function
  5. * @memberof string
  6. * @param {Object} object The object to modify.
  7. * @param {Array|string} path The path of the property to set.
  8. * @return {Object} Returns the updated object.
  9. * @example toUpperCase({ nested: { a: 'Hello world !' } }, 'fr_fr') // => { nested: { a: 'HELLO WORLD !' } }
  10. * @see {@link https://mdn.io/String.prototype.toUpperCase|String.prototype.toUpperCase} for more information.
  11. * @since 1.0.0
  12. */
  13. const toUpperCase = convertStringMethod('toUpperCase')
  14. export { toUpperCase }