Add dir snippets and add is-function.js