UNPKG

string-detect-indent

Version:
20 lines (19 loc) 779 B
!function(e, n) { "object" == typeof exports && "undefined" != typeof module ? n(exports) : "function" == typeof define && define.amd ? define([ "exports" ], n) : n((e = "undefined" != typeof globalThis ? globalThis : e || self).StringDetectIndent = {}); }(this, (function(e) { "use strict"; const n = /^([ \t]*)((?:[\S\r\n].*|)$)/, t = /^([ \t\xa0]*)((?:[\S\r\n].*|)$)/; function detectIndentLine(e, d) { const o = (null != d && d.includeNoBreakSpace ? t : n).exec(e); return { input: e, indent: o[1], body: o[2], bool: o[1].length > 0 }; } e.default = detectIndentLine, e.detectIndentLine = detectIndentLine, Object.defineProperty(e, "__esModule", { value: !0 }); })); //# sourceMappingURL=index.umd.production.min.cjs.map