js: add possibility to call function by a string parameter