string-detect-indent
Version:
simple detect string indent
21 lines (16 loc) • 488 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: !0
});
const e = /^([ \t]*)((?:[\S\r\n].*|)$)/, t = /^([ \t\xa0]*)((?:[\S\r\n].*|)$)/;
function detectIndentLine(n, d) {
const c = (null != d && d.includeNoBreakSpace ? t : e).exec(n);
return {
input: n,
indent: c[1],
body: c[2],
bool: c[1].length > 0
};
}
exports.default = detectIndentLine, exports.detectIndentLine = detectIndentLine;
//# sourceMappingURL=index.cjs.production.min.cjs.map
;