Skip to content

Commit

Permalink
fixup! Make the package compatible with browser targets natively
Browse files Browse the repository at this point in the history
  • Loading branch information
vlovich committed Feb 1, 2022
1 parent 3a25a29 commit b3335ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/browser-buffer-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
return false;
}
let fromIndex = 0;
while (fromIndex != haystack.length - 3) {
while (fromIndex !== haystack.length - 3) {
const foundFirst = haystack[fromIndex] === needle[0];
const foundSecond = haystack[fromIndex + 1] === needle[1];
const foundThird = haystack[fromIndex + 2] === needle[2];
Expand Down
5 changes: 2 additions & 3 deletions test/rfc2047.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@ for (const environment of ['node', 'browser']) {

switch (iconvType) {
case IconvType.Unavailable:
requireStubs['iconv'] = null;
requireStubs.iconv = null;
requireStubs['iconv-lite'] = null;
break;
case IconvType.LiteOnly:
requireStubs['iconv'] = null;
requireStubs.iconv = null;
break;
}

const iconvAvailable = iconvType === IconvType.Available;
const iconvLiteAvailable =
iconvAvailable || iconvType === IconvType.LiteOnly;
iconvAvailable || iconvType === IconvType.LiteOnly;

const rfc2047 = proxyquire('../lib/rfc2047', requireStubs);

Expand Down

0 comments on commit b3335ef

Please sign in to comment.