ilearnio / module-alias

Register aliases of directories and custom module paths in Node
MIT License
1.76k stars 69 forks source link

Alias Resolver #49

Open kb05 opened 5 years ago

kb05 commented 5 years ago

Hi I have found other node modules that I want to use in my project and uses routes as string that you pass as an argument (for example), to maintain the consistency of aliases in the project I would like to be able to use aliases also for those methods, is it possible to make use of some function that given a route with aliases returns me a string with the alias?

Example : global.moduleAlias('@Log/file.log') return '/storage/logs/file.log'

Kind regards.