l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

index.js (321B)


      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 
      8 'use strict';
      9 
     10 module.exports = function(str) {
     11   if (typeof str === 'string' && str.charAt(0) === '\ufeff') {
     12     return str.slice(1);
     13   }
     14   return str;
     15 };