Closed ryanve closed 12 years ago
A revamped version of Response.affix
was added to version 0.4.0. This time it's here to stay. It looks like this:
function affix(arr, prefix, suffix) {
// Return array that is a copy of arr with the prefix/suffix added to each value.
var r = []
, i = arr.length;
prefix = prefix || '';
suffix = suffix || '';
while ( i && i-- ) {
if (i in arr) {
r[i] = prefix + arr[i] + suffix;
}
}
return r;
}
Response.affix is an array utility that was used within some of the other methods. But since version 0.2.7 it is no longer needed within the library, so I'm considering removing it in the next version. Any objections? I think we should keep the lib as small as possible, but if you think it would be useful to keep...