jrburke/almond — pull request #53 by spadgos (2013-04-18 16:55:16+00:00)
Title: Method for checking whether a module can be require()'d

It can be very useful to know if a module has been defined (or is waiting to be evaluated), but the information about this isn't exposed by almond. The only other method I've found is essentially:

```javascript
function isDefined(name) {
try {
require(name);
return true;
} catch (e) {
return false;
}
}
```

...which is obviously not-so-good.

This PR exposes the information via `define.isDefined()`. I'm not sure if that's the exactly correct nomenclature, but hopefully the idea is sound.

*I haven't done the CLA thing, since I thought I'd wait for feedback first.*