Update converter.js

Added applyMap function