SteveSanderson/knockout.mapping — pull request #138 by timtucker (2013-02-11 21:47:36+00:00)
Title: Slightly shorter unionArrays

Was fiddling around with unionArrays to see if I could come up with any improvements and this is what I was able to come up with.

Unless I've missed something it should work the same as the original with the following differences:
- Supports an arbitrary # of arrays as input
- Should be a little faster
- Should be a little smaller (242 vs 255 bytes, not including the length of the original attribution)
- Should be a little smaller minified (158 vs 145 bytes using closure compiler)

Performance test:
http://jsperf.com/merge-arrays/4

Quick functionality test at:
http://jsbin.com/ivayet/1/edit