File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 360360 "description" : " You can split a string into lines using a regular expression." ,
361361 "example" : " const splitLines = (str) => str.split(/\\ r?\\ n/);"
362362 },
363+ "snippet::strip-bom" : {
364+ "id" : " snippet::strip-bom" ,
365+ "type" : " simple" ,
366+ "description" : " You can check if the first character of the string is the BOM and strip it using `String.prototype.slice` if it is." ,
367+ "example" : " str.charCodeAt(0) === 0xFEFF ? str.slice(1) : str;"
368+ },
363369 "snippet::to-lower" : {
364370 "id" : " snippet::to-lower" ,
365371 "type" : " simple" ,
812818 "moduleName" : " split-lines" ,
813819 "replacements" : [" snippet::split-lines" ]
814820 },
821+ "strip-bom" : {
822+ "type" : " module" ,
823+ "moduleName" : " strip-bom" ,
824+ "replacements" : [" snippet::strip-bom" ]
825+ },
826+ "strip-bom-string" : {
827+ "type" : " module" ,
828+ "moduleName" : " strip-bom-string" ,
829+ "replacements" : [" snippet::strip-bom" ]
830+ },
815831 "toarray" : {
816832 "type" : " module" ,
817833 "moduleName" : " toarray" ,
You can’t perform that action at this time.
0 commit comments