publised partial function in javascript