adobe/brackets — pull request #5539 by iwehrman (2013-10-17 03:14:16+00:00)
Title: Add Lo-Dash

This pull request addresses #5229 by adding Lo-Dash as a third-party dependency and deprecating a number of internal functions in favor of their corresponding Lo-Dash functions. In particular, this pull performs the following conversions and deprecations:

1. Convert instances of `Array.slice(0)` to `_.clone()`
2. Convert the lone instance of `NumberUtils.getRandomNumber()` to `_.random` and removes `NumberUtils.js`
3. Convert `StringUtils.htmlEscape` to `._escape` and deprecates the former
4. Convert `CollectionUtils.indexOf` to `_.findIndex` and deprecates the former
4. Convert `CollectionUtils.forEach` to `_.forEach` and deprecates the former
4. Convert `CollectionUtils.some` to `_.some` and deprecates the former
4. Convert `CollectionUtils.hasProperty` to `_.has` and deprecates the former

Functions are deprecated by adding a `@deprecated` annotation, and by replacing their implementation with the corresponding Lo-Dash function and a `console.warn` message. All the unit tests look good.

I'll let @gruehle decide if he wants to replace `Async.whenIdle` with `_.debounce`. I also didn't replace instances of `setTimeout(..., 0)` with `_.defer` because the Lo-Dash implementation isn't worth the trouble. ([asap](https://github.com/kriskowal/asap "High-priority task queue for Node.js and browsers") does it [better](http://www.nonblocking.io/2011/06/windownexttick.html "window.nextTick").)

CC @njx