inplace.js 186 B

123456789
  1. module.exports = function xorInplace (a, b) {
  2. var length = Math.min(a.length, b.length)
  3. for (var i = 0; i < length; ++i) {
  4. a[i] = a[i] ^ b[i]
  5. }
  6. return a.slice(0, length)
  7. }