documentcloud/underscore — pull request #1176 by dracula2000 (2013-06-30 18:56:28+00:00)
Title: Feature: Flatten to a specific depth

This change allows flatten to take an integer as it's second argument
(formerly named "shallow"). I renamed the argument to depth. Backwards-
compatible with previous flatten because true and false are coerced to
1 and 0 respectively. This mimics the behavior of Ruby's Array#flatten.