What is the purpose using a named function when assigning to a variable in JavaScript?
<p>I recently came across this pattern in the source for <a href="https://github.com/yeoman/generator-webapp">https://github.com/yeoman/generator-webapp</a>:</p>

<pre><code>AppGenerator.prototype.packageJSON = function packageJSON() {
  this.template('_package.json', 'package.json');
};
</code></pre>

<p>What's the purpose of giving the function the name "packageJSON" when you're going to assign it to a variable or object property anyways? I've always used anonymous functions in similar cases.</p>
