Update util.js

add method extractor