mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
refactor(util) simplify
This commit is contained in:
parent
62f66c0c01
commit
9fde2e3361
1 changed files with 3 additions and 6 deletions
|
|
@ -107,9 +107,7 @@ module.exports.findObjByNameInArr = (array, name) => {
|
|||
* @param name
|
||||
*/
|
||||
module.exports.time = (name) => {
|
||||
const console = Scope.console;
|
||||
|
||||
exec.ifExist(console, 'time', [name]);
|
||||
exec.ifExist(Scope.console, 'time', [name]);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -117,9 +115,7 @@ module.exports.time = (name) => {
|
|||
* @param name
|
||||
*/
|
||||
module.exports.timeEnd = (name) => {
|
||||
const console = Scope.console;
|
||||
|
||||
exec.ifExist(console, 'timeEnd', [name]);
|
||||
exec.ifExist(Scope.console, 'timeEnd', [name]);
|
||||
};
|
||||
|
||||
function getStrBigFirst(str) {
|
||||
|
|
@ -127,6 +123,7 @@ function getStrBigFirst(str) {
|
|||
throw Error('str could not be empty!');
|
||||
|
||||
const first = str[0].toUpperCase();
|
||||
|
||||
return first + str.slice(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue