Adjust the following function to accept only string-type inputs and return a promise which resolves to a number:
string
number