diff options
Diffstat (limited to 'node_modules/strip-bom-string/index.js')
| -rw-r--r-- | node_modules/strip-bom-string/index.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/strip-bom-string/index.js b/node_modules/strip-bom-string/index.js new file mode 100644 index 0000000..4caff84 --- /dev/null +++ b/node_modules/strip-bom-string/index.js @@ -0,0 +1,15 @@ +/*! + * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string> + * + * Copyright (c) 2015, 2017, Jon Schlinkert. + * Released under the MIT License. + */ + +'use strict'; + +module.exports = function(str) { + if (typeof str === 'string' && str.charAt(0) === '\ufeff') { + return str.slice(1); + } + return str; +}; |
