Skip to content

Commit

Permalink
Use array index instead of Buffer.get
Browse files Browse the repository at this point in the history
Buffer.get was depracted in 2013 [1] and removed entirely in
Node 6 [2].

Closes #13.

[1] nodejs/node#4587
[2] https://github.com/nodejs/node/wiki/Breaking-changes-between-v5-and-v6#buffer
  • Loading branch information
Alex Booker committed Jun 3, 2016
1 parent 17878f4 commit 4ac00c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bufferjs/indexOf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
while (i<l) {
var good = true;
for (var j=0, n=needle.length; j<n; j++) {
if (haystack.get(i+j) !== needle.get(j)) {
if (haystack[i+j] !== needle[j]) {
good = false;
break;
}
Expand Down

0 comments on commit 4ac00c2

Please sign in to comment.