How to pass parameter to a promise function
<p>this might seem a silly question but I am a newbie in this topic. I am working on promises on node js. And I want to pass parameter to a promise function. However I could not figure it out.</p>

<pre><code>someModule.someFunction.then(username, password,function(uid) {
  /*stuff */
}
</code></pre>

<p>and the function is something like</p>

<pre><code>var someFunction = new Promise(username, password, function(resolve, reject) {
  /*stuff using username, password*/
  if ( /* everything turned out fine */ ) {
    resolve("Stuff worked!");
  } else {
    reject(Error("It broke"));
  }
});
</code></pre>