This module provides a class for checking if a string consists of lowercase letters only.
To use this module, you should have the "node-string-methods" npm package installed. You can install it using npm or yarn:
npm install node-string-methodsconst IsLower = require('node-string-methods/isLower');
// Create an instance of the IsLower class with a string
const str1 = 'lowercase';
const str2 = 'MixedCase';
const lowerChecker1 = new IsLower(str1);
const lowerChecker2 = new IsLower(str2);
// Execute the isLower operation
const result1 = lowerChecker1.execute();
const result2 = lowerChecker2.execute();
console.log(result1); // Output: true
console.log(result2); // Output: falsestr(String): The input string that you want to check for consisting of lowercase letters.
Creates a new instance of the IsLower class with the provided input string.
Checks if the input string consists of lowercase letters only.
- Returns:
trueif the input string consists of lowercase letters only,falseotherwise.
const IsLower = require('node-string-methods/isLower');
const str1 = 'lowercase';
const str2 = 'MixedCase';
const lowerChecker1 = new IsLower(str1);
const lowerChecker2 = new IsLower(str2);
const result1 = lowerChecker1.execute();
const result2 = lowerChecker2.execute();
console.log(result1); // Output: true
console.log(result2); // Output: false