voca
Version:
The ultimate JavaScript string library
34 lines (30 loc) • 846 B
JavaScript
import './internal/is_nil.js';
import './is_string.js';
import { c as coerceToString } from './internal/coerce_to_string.js';
import './internal/const.js';
import './internal/const_extended.js';
import isAlpha from './is_alpha.js';
/**
* Checks whether `subject` has only lower case characters.
*
* @function isLowerCase
* @static
* @since 1.0.0
* @memberOf Query
* @param {string} [subject=''] The string to verify.
* @return {boolean} Returns `true` if `subject` is lower case or `false` otherwise.
* @example
* v.isLowerCase('motorcycle');
* // => true
*
* v.isLowerCase('John');
* // => false
*
* v.isLowerCase('T1000');
* // => false
*/
function isLowerCase(subject) {
var valueString = coerceToString(subject);
return isAlpha(valueString) && valueString.toLowerCase() === valueString;
}
export default isLowerCase;