summaryrefslogtreecommitdiff
path: root/node_modules/strip-bom-string/index.js
blob: 4caff84d2142a2da13dcd505702145e613b4ac87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
};