package: refactoring $inject validation