unbom
Strip a BOM (UTF-8 Byte Order Mark) from a string or Buffer.
API
This module exports one function:
unbom(x)
x
is the string or Buffer that might start with a BOM.
If it does, returns the remainder of x
.
Otherwise, returns the original x
.
Known issues
- Needs more/better tests and docs.
License
ISC