strongloop/loopback-phase — pull request #7 by bajtos (2014-11-12 07:53:34+00:00)
Title: phase-list: implement `.zipMerge(names)`

The new method merges the provided list of names with the existing
phases in such way that the order of phases is preserved.

Example:

// Initial list of phases
phaseList.add(['initial', 'session', 'auth',
'routes', 'files', 'final']);

// zip-merge more phases
phaseList.zipMerge([
'initial', 'postinit', 'preauth', 'auth',
'routes', 'subapps', 'final', 'last'
]);

// print the result
console.log('Result:', phaseList.getPhaseNames());

Output:

Result: [
'initial', 'postinit', 'preauth', 'session', 'auth',
'routes', 'subapps', 'files', 'final', 'last'
]

See also #786.

/to @ritch please review
/cc @raymondfeng