We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23fd4a1 commit b7e679dCopy full SHA for b7e679d
src/properties.ts
@@ -27,6 +27,11 @@ export type KeyValuePair = {
27
*/
28
export const empty = (): Properties => ({lines: []})
29
30
+/**
31
+ * Byte-order mark.
32
+ */
33
+export const BOM = 0xfeff
34
+
35
/**
36
* Parses java properties file contents.
37
*
@@ -43,7 +48,7 @@ export const parse = (contents: string): Properties => {
43
48
}
44
49
45
50
// Remove BOM from the first line
46
- if (lines.length > 0 && lines[0].codePointAt(0) === 0xfeff) {
51
+ if (lines.length > 0 && lines[0].codePointAt(0) === BOM) {
47
52
lines[0] = lines[0].slice(1)
53
54
0 commit comments