Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added comment to new version of arrayClone in events.js
  • Loading branch information
alemures committed Nov 24, 2015
commit 66dd7c72f0b2e61de6ab719d98c4d41dbe810a58
2 changes: 2 additions & 0 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ function spliceOne(list, index) {
list.pop();
}

// Optimized common usages (listeners < 50) and using slice for
// large arrays so it scales much better
function arrayClone(arr, length) {
if (length === 1) {
return [arr[0]];
Expand Down