Skip to content

Commit 90aa68d

Browse files
mgwalkerljharb
andauthored
Update utils/readPkgUp.js
Co-authored-by: Jordan Harband <ljharb@gmail.com>
1 parent c14ddfa commit 90aa68d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

utils/readPkgUp.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@ const fs = require('fs');
55
const findUp = require('find-up');
66

77
function stripBOM(str) {
8-
if(str.charCodeAt(0) === 0xFEFF) {
9-
return str.slice(1);
10-
}
11-
return str;
8+
return str.replace(/^\uFEFF/, '');
129
}
1310

1411
/**

0 commit comments

Comments
 (0)