As already mentioned, toArray() for jQuery objects.
$.makeArray() for brevity (except the last instance of the object) is similar to JS Array.prototype.slice.call() or [].slice.call()
but there is a difference when processing POJO with an excess value of length
Examples
: {
length: 5,
0
$.makeArray({ 0:'a', 1:'b', length:1 }) // ["a"] [].slice.call({ 0:'a', 1:'b', length:1 }) // ["a"]
one:
$.makeArray({ 0:'a', 1:'b', length:4 }) // { 0:'a', 1:'b', length:4 } // WUT? [].slice.call({0:'a', 1:'b', length:4}) // ["a", "b", undefined, undefined]
2:
$.makeArray({12:'a', 13:'b', length:1}) // { 12:'a', 13:'b', length:1 } // WUT? [].slice.call({12:'a', 13:'b', length:1}) // [undefined]
3:
$.makeArray({12:'a', 13:'b', length:1}) // { 12:'a', 13:'b', length:1 } // WUT? [].slice.call({12:'a', 13:'b', length:1}) // [undefined]
4:
$.makeArray({ 0:'a', 2:'b', length:2 }) // { 0:'a', 2:'b', length:2 } // WUT? [].slice.call({ 0:'a', 2:'b', length:2 }) // ["a", undefined]
}
So $.makeArray() just returns the input object whenever a key with a specific index is not found