index.js 321 B

123456789101112131415
  1. /*!
  2. * strip-bom-string <https://github.com/jonschlinkert/strip-bom-string>
  3. *
  4. * Copyright (c) 2015, 2017, Jon Schlinkert.
  5. * Released under the MIT License.
  6. */
  7. 'use strict';
  8. module.exports = function(str) {
  9. if (typeof str === 'string' && str.charAt(0) === '\ufeff') {
  10. return str.slice(1);
  11. }
  12. return str;
  13. };