js-function-lib
Version:
JavaScript function library
18 lines (17 loc) • 423 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* 从string字符串中移除前面的空格
*
* @param {string} string 要处理的字符串
* @returns {string} 返回处理后的字符串
* @version 1.1.5
* @example
*
* trimStart(' 1 2 3 ');
* // => '1 2 3 '
*/
function trimStart(string) {
return string.replace(/^\s+/, '');
}
exports.default = trimStart;