strongloop/loopback — pull request #925 by bajtos (2014-12-15 07:16:07+00:00)
Title: server-app: make _sortLayersByPhase stable

Fix the phase-sorting algorithm to use a stable sorting algorithm,
since the built-in `Array.prototype.sort` is not stable.

/to @ritch or @raymondfeng please review