'use strict';

// MODULES //

var isString = require( '@stdlib/utils/is-string' ).isPrimitive;


// MAIN //

/**
* Uncapitalizes the first character of a string.
*
* @param {string} str - input string
* @throws {TypeError} must provide a string primitive
* @returns {string} input string with first character converted lowercase
*
* @example
* var out = uncapitalize( 'Last man standing' );
* // returns  'last man standing'
* @example
* var out = uncapitalize( 'Presidential election' );
* // returns 'presidential Election'
* @example
* var out = uncapitalize( 'JavaScript' );
* // returns 'javaScript'
* @example
* var out = uncapitalize( 'Hidden Treasures' );
* // returns 'hidden Treasures';
*/
function uncapitalize( str ) {
	if ( !isString( str ) ) {
		throw new TypeError( 'invalid input argument. First argument must be a string primitive. Value: `' + str + '`.' );
	}
	if ( str === '' ) {
		return '';
	}
	return str.charAt( 0 ).toLowerCase() + str.slice( 1 );
} // end FUNCTION uncapitalize()


// EXPORTS //

module.exports = uncapitalize;

@@ -509,17 +509,17 @@
 dential 
-E
+e
 lection'

Fix example