Update index.js

evaluating function expressions for dynamic mappings.