feat(directive): add directive snippet to js