diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index 3758477e..6bc77f1a 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -342,6 +342,12 @@ "description": "You can split a string into lines using a regular expression.", "example": "const splitLines = (str) => str.split(/\\r?\\n/);" }, + "snippet::strip-bom": { + "id": "snippet::strip-bom", + "type": "simple", + "description": "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;" + }, "snippet::to-lower": { "id": "snippet::to-lower", "type": "simple", @@ -774,6 +780,16 @@ "moduleName": "split-lines", "replacements": ["snippet::split-lines"] }, + "strip-bom": { + "type": "module", + "moduleName": "strip-bom", + "replacements": ["snippet::strip-bom"] + }, + "strip-bom-string": { + "type": "module", + "moduleName": "strip-bom-string", + "replacements": ["snippet::strip-bom"] + }, "toarray": { "type": "module", "moduleName": "toarray",