npm module: lift functions of any arity into a Promises/A+ chain