Initial commit

parent d7428120
'use strict';
const camelCase = require("camelcase");
const fileExtension = require("file-extension");
/**
* compare the input before and after the conversion
* @param input
* @returns {boolean}
*/
module.exports.checkString = (input) => {
return input === camelCase(input);
};
/**
* exclude file format from file name itself
* @param input
* @returns {boolean}
*/
module.exports.checkFile = (input) => {
const fileName = input.replace(`.${fileExtension(input, {preserveCase: true})}`, "");
return fileName === camelCase(fileName);
};
\ No newline at end of file
{
"name": "isCamelCase",
"version": "0.5.0",
"dependencies": {
"camelcase": "^5.0.0",
"file-extension": "^4.0.5"
},
"devDependencies": {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment