Elgg/Elgg — pull request #5818 by ewinslow (2013-07-15 09:01:14+00:00)
Title: Fixes #5314: Automatically names anonymous AMD modules

Uses a simple regex that is not robust in theory but should be in practice:

It assumes the typical format for AMD modules is like so:

```js
/**
* Some module description?
*/
define({});
```

The following would break it, since it would insert the name into the define call within the comments, which is probably not what was intended.

```js
/*
define() becomes define('module/name')
*/
define({});
```

Also, the following would not work, since `define()` doesn't start on it's own line.

```js
/** Brief description */ define({});
```