add function invocation patterns to function.js