helper.js 527 B

1234567891011121314151617
  1. module.exports = {
  2. __construct:function(){
  3. global.H = function(healperName){
  4. if(!healperName){
  5. LOGGER.error('Helper name undefined!!');
  6. return null
  7. }
  8. try{
  9. FILE.statSync(Core.Path.Helper + '/'+healperName+'.js');
  10. }catch(e){
  11. LOGGER.error('No such helper ['+healperName+']');
  12. return null;
  13. }
  14. return require(Core.Path.Helper + '/'+healperName+'.js');
  15. }
  16. }
  17. }