evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a utility that formats commit message subjects with configurable capitalization rules. The formatter should support three transformation strategies to ensure consistency in commit messages.
Implement a subject formatter that:
/**
* Formats a commit message subject according to the specified case transformation mode.
*
* @param {string} subject - The raw commit message subject to format
* @param {object} options - Configuration options
* @param {boolean|null} options.upperCaseSubject - Transformation mode:
* - true: Force uppercase first letter
* - false: Force lowercase first letter
* - null: Preserve original capitalization
* @returns {string} The formatted subject string
*/
function formatSubject(subject, options) {
// IMPLEMENTATION HERE
}
module.exports = {
formatSubject
};Provides commit message generation and formatting capabilities including subject case transformation.