code formatting for directives.js