Opal-Estate-Pro/node_modules/strip-bom-string/index.js
2019-09-13 11:27:52 +07:00

16 lines
321 B
JavaScript
Executable File

/*!
* 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;
};