helper.js 339 B

123456789101112131415161718
  1. /*
  2. Helper Class
  3. This script handles basic stuffs
  4. */
  5. function filepathClean(webroot){
  6. if (webroot.substr(webroot.length -1, 1) == "/"){
  7. webroot = webroot.substr(0, webroot.length - 1);
  8. }
  9. return webroot;
  10. }
  11. function retrunErrorObject(message){
  12. sendJSONResp(JSON.stringify({
  13. error: message
  14. }))
  15. }