2.3.4 • Published 5 years ago
isdone v2.3.4
##Array :
- arrayUtil
containSubArray = (longArray,smallArray) => boolean##Auth :
- authUtil
generatePassword = (length) => String
hashPassword = async (password, secret) => String
comparePassword = async (password,userPassword) => Boolean##Controller
- controllerUtil
treatExpressValidator = async (req, res, callback) => void##Date
- dateUtil
convertDateToDateTime = (data_evaluation) => momentObject
formatDate = (date) => momentObject##DataBase
- dbUtil
- mongoDB
castToObjectId = (id) => ##File
- fileUtil
moveFile = (file, dir2)
isDirExist = (dir)
removeFile = async (path)
haveExtensionfromFileName = (filename) ##general
- generalUtil
getPicture = (files,picture,cdn_url,picture_storage_url)##Pagination
- paginationUtil
paginationReturn = (listCount,list,page,nextLink)##request
- RequestUtil
getRequest(urlroot, url,
header = {protect : null,authUser : null,typeContent : null},
callbackSuccess,
callbackError)
postRequest(urlroot, url, data,
header = {protect : null,authUser : null,typeContent : null},
callbackSuccess,
callbackError)
patchRequest(urlroot, url, data,
header = {protect : null,authUser : null,typeContent : null},
callbackSuccess,
callbackError)
deleteRequest(urlroot, url,
header = {protect : null,authUser : null,typeContent : null},
callbackSuccess,
callbackError)
putRequest(urlroot, url, data,
header = {protect : null,authUser : null,typeContent : null},
callbackSuccess,
callbackError) ##responseHandler
- responseHandler
responseOkServer = (res,message)
responseErrorServer = (res,err)
responseUnautharized = (res,message)
responseUnproccesabaleEntity = (res,message)
responseForrbien = (res,message)
responseBadResquest = (res,message)
responseNotFound = (res,message)##token
- tokenUtil
getTokenBearer = (token)
verifyToken = async (token, secret)
signToken = async (objPayload,secret,timeExperation)
verifyTokenHeader = async (authorization,jwtSecret)