Seeking advice on a coding issue I'm facing. Currently, I am in the process of creating an npm package for angular / angular material, which involves implementing some checks.
If a developer fails to pass a specific argument to my function, the function will automatically set its own default values and display a warning message:
console.warn('You passed fewer sort directions than the sort parameter requires. Using default value \'asc\'');
This is simply meant as a notification for the developer, so when the application is running in production
, the warning should not be displayed anymore.
What would be considered best practices for addressing such use-cases?