repo
replacements.fyi

// package

strip-bom

type: "module"

// preferences

// replacements (1)

snippet::strip-bom

Simple or drop-in replacement

This package is no longer necessary. You can check if the first character of the string is the BOM and strip it using `String.prototype.slice` if it is.

// example

str.charCodeAt(0) === 0xfeff ? str.slice(1) : str;