title: How to name a function which calls callback if certain conditions are met?
body: <p>I recently started working with nodejs. I'd like to follow the <em>async</em> nature of it and write some helper functions which take one function as an argument and call that function only if certain criteria are met, for example:</p>
  
  <pre><code>function areMandatoryFieldsFilledOut( fields, httpRequest, httpResponse, callback ) {
      /* some logic */
      if( mandatory_fields_have_been_filled_out ) {
          callback();
      } else {
          httpResponse.send('Mandatory fields have not been filled out!');
      }
  }
  // usage
  areMandatoryFieldsFilledOut(['username', 'password'], req, res, function () {
      // this is executed only if both username and password values are supplied
  }
  </code></pre>
  
  <p>What would be the best way write such functions? Is there a special word that You use for the beginning of the function name, like, 'ensure', e.g. '<code>ensureAuthenticated( callback )</code>?'
  Is there a way to convince the reader of my code that the callback will be called only if the criteria are met just by function declaration (name and args)?</p>