Skip to content

Commit

Permalink
feat: keep orig array unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercejudo committed Aug 17, 2015
1 parent 13ebc8f commit f3de6f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/everyAgainstFirst.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

module.exports = function everyAgainstFirst(array, callback, thisArg) {
module.exports = function everyAgainstFirst(origArray, callback, thisArg) {
var array = origArray.slice();
var first = array.shift();

return array.every(function (current, index) {
Expand Down

0 comments on commit f3de6f2

Please sign in to comment.