lean-agents 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +407 -0
- package/LICENSE +21 -0
- package/README.es.md +560 -0
- package/README.md +559 -2
- package/core/AGENTS.es.md +60 -0
- package/core/AGENTS.md +60 -0
- package/core/README.md +8 -0
- package/core/agents/debug.md +14 -0
- package/core/agents/explore.md +13 -0
- package/core/agents/planner.md +14 -0
- package/core/agents/research.md +13 -0
- package/core/agents/review.md +13 -0
- package/core/copilot-usage-tui.js +189 -0
- package/core/mcp.json +38 -0
- package/core/pins.json +39 -0
- package/core/tiers.json +4 -0
- package/node_modules/@clack/core/LICENSE +9 -0
- package/node_modules/@clack/core/README.md +22 -0
- package/node_modules/@clack/core/dist/index.d.mts +503 -0
- package/node_modules/@clack/core/dist/index.mjs +1003 -0
- package/node_modules/@clack/core/package.json +63 -0
- package/node_modules/@clack/prompts/LICENSE +9 -0
- package/node_modules/@clack/prompts/README.md +396 -0
- package/node_modules/@clack/prompts/dist/index.d.mts +949 -0
- package/node_modules/@clack/prompts/dist/index.mjs +1423 -0
- package/node_modules/@clack/prompts/package.json +67 -0
- package/node_modules/fast-string-truncated-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/index.js +111 -0
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +19 -0
- package/node_modules/fast-string-truncated-width/dist/types.js +2 -0
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +4 -0
- package/node_modules/fast-string-truncated-width/dist/utils.js +20 -0
- package/node_modules/fast-string-truncated-width/license +21 -0
- package/node_modules/fast-string-truncated-width/package.json +35 -0
- package/node_modules/fast-string-truncated-width/readme.md +59 -0
- package/node_modules/fast-string-width/dist/index.d.ts +4 -0
- package/node_modules/fast-string-width/dist/index.js +14 -0
- package/node_modules/fast-string-width/license +21 -0
- package/node_modules/fast-string-width/package.json +34 -0
- package/node_modules/fast-string-width/readme.md +42 -0
- package/node_modules/fast-wrap-ansi/LICENSE +23 -0
- package/node_modules/fast-wrap-ansi/README.md +26 -0
- package/node_modules/fast-wrap-ansi/lib/main.d.ts +6 -0
- package/node_modules/fast-wrap-ansi/lib/main.js +218 -0
- package/node_modules/fast-wrap-ansi/package.json +51 -0
- package/node_modules/jsonc-parser/CHANGELOG.md +76 -0
- package/node_modules/jsonc-parser/LICENSE.md +21 -0
- package/node_modules/jsonc-parser/README.md +364 -0
- package/node_modules/jsonc-parser/SECURITY.md +41 -0
- package/node_modules/jsonc-parser/lib/esm/impl/edit.js +185 -0
- package/node_modules/jsonc-parser/lib/esm/impl/format.js +261 -0
- package/node_modules/jsonc-parser/lib/esm/impl/parser.js +659 -0
- package/node_modules/jsonc-parser/lib/esm/impl/scanner.js +443 -0
- package/node_modules/jsonc-parser/lib/esm/impl/string-intern.js +29 -0
- package/node_modules/jsonc-parser/lib/esm/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/esm/main.js +178 -0
- package/node_modules/jsonc-parser/lib/umd/impl/edit.js +201 -0
- package/node_modules/jsonc-parser/lib/umd/impl/format.js +275 -0
- package/node_modules/jsonc-parser/lib/umd/impl/parser.js +682 -0
- package/node_modules/jsonc-parser/lib/umd/impl/scanner.js +456 -0
- package/node_modules/jsonc-parser/lib/umd/impl/string-intern.js +42 -0
- package/node_modules/jsonc-parser/lib/umd/main.d.ts +351 -0
- package/node_modules/jsonc-parser/lib/umd/main.js +194 -0
- package/node_modules/jsonc-parser/package.json +37 -0
- package/node_modules/sisteransi/license +21 -0
- package/node_modules/sisteransi/package.json +34 -0
- package/node_modules/sisteransi/readme.md +113 -0
- package/node_modules/sisteransi/src/index.js +58 -0
- package/node_modules/sisteransi/src/sisteransi.d.ts +35 -0
- package/package.json +30 -4
- package/profiles/README.md +10 -0
- package/profiles/anthropic-api/gsd-defaults.json +26 -0
- package/profiles/anthropic-api.json +18 -0
- package/profiles/antigravity.json +12 -0
- package/profiles/claude-subscription/gsd-defaults.json +26 -0
- package/profiles/claude-subscription.json +17 -0
- package/profiles/github-copilot/gsd-defaults.json +26 -0
- package/profiles/github-copilot.json +17 -0
- package/profiles/openai-api/gsd-defaults.json +26 -0
- package/profiles/openai-api.json +17 -0
- package/profiles/opencode-go/gsd-defaults.json +26 -0
- package/profiles/opencode-go.json +17 -0
- package/profiles/vertex-gemini/gsd-defaults.json +26 -0
- package/profiles/vertex-gemini.json +18 -0
- package/scripts/adhd-skill.mjs +12 -0
- package/scripts/behavior-diff.sh +47 -0
- package/scripts/bump-pins.mjs +115 -0
- package/scripts/check-private.sh +52 -0
- package/scripts/check-readme.mjs +131 -0
- package/scripts/ci-download.sh +20 -0
- package/scripts/ci-install-opencode-v2.sh +6 -0
- package/scripts/ci-latest-report.mjs +38 -0
- package/scripts/ci-timing.mjs +61 -0
- package/scripts/copilot-context-mode.mjs +33 -0
- package/scripts/labels.sh +56 -0
- package/scripts/lean.mjs +1319 -0
- package/scripts/lib/adapters/antigravity.mjs +83 -0
- package/scripts/lib/adapters/claude.mjs +127 -0
- package/scripts/lib/adapters/copilot-cli.mjs +82 -0
- package/scripts/lib/adapters/cursor.mjs +60 -0
- package/scripts/lib/adapters/opencode-v1.mjs +79 -0
- package/scripts/lib/adapters/opencode-v2.mjs +216 -0
- package/scripts/lib/adapters/vscode-copilot.mjs +56 -0
- package/scripts/lib/adhd.mjs +28 -0
- package/scripts/lib/adopt.mjs +619 -0
- package/scripts/lib/agent-lifecycle.mjs +280 -0
- package/scripts/lib/backup-stamp.mjs +25 -0
- package/scripts/lib/copilot-usage.mjs +49 -0
- package/scripts/lib/doctor.mjs +279 -0
- package/scripts/lib/feedback.mjs +48 -0
- package/scripts/lib/fsops.mjs +319 -0
- package/scripts/lib/gsd.mjs +42 -0
- package/scripts/lib/inventory.mjs +196 -0
- package/scripts/lib/lean-update.mjs +30 -0
- package/scripts/lib/logins.mjs +28 -0
- package/scripts/lib/migrate.mjs +407 -0
- package/scripts/lib/network.mjs +119 -0
- package/scripts/lib/node-runtime.mjs +85 -0
- package/scripts/lib/opencode-backup.mjs +204 -0
- package/scripts/lib/opencode-upgrade.mjs +441 -0
- package/scripts/lib/opencode1.mjs +203 -0
- package/scripts/lib/parallel.mjs +270 -0
- package/scripts/lib/pins-diff.mjs +33 -0
- package/scripts/lib/pins.mjs +52 -0
- package/scripts/lib/plugin-health.mjs +191 -0
- package/scripts/lib/prereqs.mjs +203 -0
- package/scripts/lib/project.mjs +38 -0
- package/scripts/lib/redact.mjs +30 -0
- package/scripts/lib/render.mjs +101 -0
- package/scripts/lib/shell-path.mjs +22 -0
- package/scripts/lib/summary-data.mjs +30 -0
- package/scripts/lib/summary-html.mjs +159 -0
- package/scripts/lib/system.mjs +269 -0
- package/scripts/lib/terminals.mjs +316 -0
- package/scripts/lib/ui.mjs +34 -0
- package/scripts/lib/unverified.mjs +49 -0
- package/scripts/lib/update-plan.mjs +60 -0
- package/scripts/lib/upgrade.mjs +231 -0
- package/scripts/lib/verify-commit.mjs +16 -0
- package/scripts/lib/verify-prompt.mjs +46 -0
- package/scripts/lib/verify-sha256.mjs +20 -0
- package/scripts/lint-workflows.mjs +25 -0
- package/scripts/models-refresh.mjs +58 -0
- package/scripts/parallel.mjs +59 -0
- package/scripts/pins-latest.mjs +66 -0
- package/scripts/release.mjs +71 -0
- package/scripts/verify-pins.mjs +36 -0
- package/scripts/version-watch.mjs +124 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
'use strict';
|
|
6
|
+
import { createScanner } from './scanner';
|
|
7
|
+
import { cachedSpaces, cachedBreakLinesWithSpaces, supportedEols } from './string-intern';
|
|
8
|
+
export function format(documentText, range, options) {
|
|
9
|
+
let initialIndentLevel;
|
|
10
|
+
let formatText;
|
|
11
|
+
let formatTextStart;
|
|
12
|
+
let rangeStart;
|
|
13
|
+
let rangeEnd;
|
|
14
|
+
if (range) {
|
|
15
|
+
rangeStart = range.offset;
|
|
16
|
+
rangeEnd = rangeStart + range.length;
|
|
17
|
+
formatTextStart = rangeStart;
|
|
18
|
+
while (formatTextStart > 0 && !isEOL(documentText, formatTextStart - 1)) {
|
|
19
|
+
formatTextStart--;
|
|
20
|
+
}
|
|
21
|
+
let endOffset = rangeEnd;
|
|
22
|
+
while (endOffset < documentText.length && !isEOL(documentText, endOffset)) {
|
|
23
|
+
endOffset++;
|
|
24
|
+
}
|
|
25
|
+
formatText = documentText.substring(formatTextStart, endOffset);
|
|
26
|
+
initialIndentLevel = computeIndentLevel(formatText, options);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
formatText = documentText;
|
|
30
|
+
initialIndentLevel = 0;
|
|
31
|
+
formatTextStart = 0;
|
|
32
|
+
rangeStart = 0;
|
|
33
|
+
rangeEnd = documentText.length;
|
|
34
|
+
}
|
|
35
|
+
const eol = getEOL(options, documentText);
|
|
36
|
+
const eolFastPathSupported = supportedEols.includes(eol);
|
|
37
|
+
let numberLineBreaks = 0;
|
|
38
|
+
let indentLevel = 0;
|
|
39
|
+
let indentValue;
|
|
40
|
+
if (options.insertSpaces) {
|
|
41
|
+
indentValue = cachedSpaces[options.tabSize || 4] ?? repeat(cachedSpaces[1], options.tabSize || 4);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
indentValue = '\t';
|
|
45
|
+
}
|
|
46
|
+
const indentType = indentValue === '\t' ? '\t' : ' ';
|
|
47
|
+
let scanner = createScanner(formatText, false);
|
|
48
|
+
let hasError = false;
|
|
49
|
+
function newLinesAndIndent() {
|
|
50
|
+
if (numberLineBreaks > 1) {
|
|
51
|
+
return repeat(eol, numberLineBreaks) + repeat(indentValue, initialIndentLevel + indentLevel);
|
|
52
|
+
}
|
|
53
|
+
const amountOfSpaces = indentValue.length * (initialIndentLevel + indentLevel);
|
|
54
|
+
if (!eolFastPathSupported || amountOfSpaces > cachedBreakLinesWithSpaces[indentType][eol].length) {
|
|
55
|
+
return eol + repeat(indentValue, initialIndentLevel + indentLevel);
|
|
56
|
+
}
|
|
57
|
+
if (amountOfSpaces <= 0) {
|
|
58
|
+
return eol;
|
|
59
|
+
}
|
|
60
|
+
return cachedBreakLinesWithSpaces[indentType][eol][amountOfSpaces];
|
|
61
|
+
}
|
|
62
|
+
function scanNext() {
|
|
63
|
+
let token = scanner.scan();
|
|
64
|
+
numberLineBreaks = 0;
|
|
65
|
+
while (token === 15 /* SyntaxKind.Trivia */ || token === 14 /* SyntaxKind.LineBreakTrivia */) {
|
|
66
|
+
if (token === 14 /* SyntaxKind.LineBreakTrivia */ && options.keepLines) {
|
|
67
|
+
numberLineBreaks += 1;
|
|
68
|
+
}
|
|
69
|
+
else if (token === 14 /* SyntaxKind.LineBreakTrivia */) {
|
|
70
|
+
numberLineBreaks = 1;
|
|
71
|
+
}
|
|
72
|
+
token = scanner.scan();
|
|
73
|
+
}
|
|
74
|
+
hasError = token === 16 /* SyntaxKind.Unknown */ || scanner.getTokenError() !== 0 /* ScanError.None */;
|
|
75
|
+
return token;
|
|
76
|
+
}
|
|
77
|
+
const editOperations = [];
|
|
78
|
+
function addEdit(text, startOffset, endOffset) {
|
|
79
|
+
if (!hasError && (!range || (startOffset < rangeEnd && endOffset > rangeStart)) && documentText.substring(startOffset, endOffset) !== text) {
|
|
80
|
+
editOperations.push({ offset: startOffset, length: endOffset - startOffset, content: text });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
let firstToken = scanNext();
|
|
84
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
85
|
+
addEdit(repeat(eol, numberLineBreaks), 0, 0);
|
|
86
|
+
}
|
|
87
|
+
if (firstToken !== 17 /* SyntaxKind.EOF */) {
|
|
88
|
+
let firstTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
89
|
+
let initialIndent = (indentValue.length * initialIndentLevel < 20) && options.insertSpaces
|
|
90
|
+
? cachedSpaces[indentValue.length * initialIndentLevel]
|
|
91
|
+
: repeat(indentValue, initialIndentLevel);
|
|
92
|
+
addEdit(initialIndent, formatTextStart, firstTokenStart);
|
|
93
|
+
}
|
|
94
|
+
while (firstToken !== 17 /* SyntaxKind.EOF */) {
|
|
95
|
+
let firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
96
|
+
let secondToken = scanNext();
|
|
97
|
+
let replaceContent = '';
|
|
98
|
+
let needsLineBreak = false;
|
|
99
|
+
while (numberLineBreaks === 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) {
|
|
100
|
+
let commentTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
101
|
+
addEdit(cachedSpaces[1], firstTokenEnd, commentTokenStart);
|
|
102
|
+
firstTokenEnd = scanner.getTokenOffset() + scanner.getTokenLength() + formatTextStart;
|
|
103
|
+
needsLineBreak = secondToken === 12 /* SyntaxKind.LineCommentTrivia */;
|
|
104
|
+
replaceContent = needsLineBreak ? newLinesAndIndent() : '';
|
|
105
|
+
secondToken = scanNext();
|
|
106
|
+
}
|
|
107
|
+
if (secondToken === 2 /* SyntaxKind.CloseBraceToken */) {
|
|
108
|
+
if (firstToken !== 1 /* SyntaxKind.OpenBraceToken */) {
|
|
109
|
+
indentLevel--;
|
|
110
|
+
}
|
|
111
|
+
;
|
|
112
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 1 /* SyntaxKind.OpenBraceToken */) {
|
|
113
|
+
replaceContent = newLinesAndIndent();
|
|
114
|
+
}
|
|
115
|
+
else if (options.keepLines) {
|
|
116
|
+
replaceContent = cachedSpaces[1];
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (secondToken === 4 /* SyntaxKind.CloseBracketToken */) {
|
|
120
|
+
if (firstToken !== 3 /* SyntaxKind.OpenBracketToken */) {
|
|
121
|
+
indentLevel--;
|
|
122
|
+
}
|
|
123
|
+
;
|
|
124
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines && firstToken !== 3 /* SyntaxKind.OpenBracketToken */) {
|
|
125
|
+
replaceContent = newLinesAndIndent();
|
|
126
|
+
}
|
|
127
|
+
else if (options.keepLines) {
|
|
128
|
+
replaceContent = cachedSpaces[1];
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
switch (firstToken) {
|
|
133
|
+
case 3 /* SyntaxKind.OpenBracketToken */:
|
|
134
|
+
case 1 /* SyntaxKind.OpenBraceToken */:
|
|
135
|
+
indentLevel++;
|
|
136
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
|
|
137
|
+
replaceContent = newLinesAndIndent();
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
replaceContent = cachedSpaces[1];
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
case 5 /* SyntaxKind.CommaToken */:
|
|
144
|
+
if (options.keepLines && numberLineBreaks > 0 || !options.keepLines) {
|
|
145
|
+
replaceContent = newLinesAndIndent();
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
replaceContent = cachedSpaces[1];
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
case 12 /* SyntaxKind.LineCommentTrivia */:
|
|
152
|
+
replaceContent = newLinesAndIndent();
|
|
153
|
+
break;
|
|
154
|
+
case 13 /* SyntaxKind.BlockCommentTrivia */:
|
|
155
|
+
if (numberLineBreaks > 0) {
|
|
156
|
+
replaceContent = newLinesAndIndent();
|
|
157
|
+
}
|
|
158
|
+
else if (!needsLineBreak) {
|
|
159
|
+
replaceContent = cachedSpaces[1];
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
162
|
+
case 6 /* SyntaxKind.ColonToken */:
|
|
163
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
164
|
+
replaceContent = newLinesAndIndent();
|
|
165
|
+
}
|
|
166
|
+
else if (!needsLineBreak) {
|
|
167
|
+
replaceContent = cachedSpaces[1];
|
|
168
|
+
}
|
|
169
|
+
break;
|
|
170
|
+
case 10 /* SyntaxKind.StringLiteral */:
|
|
171
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
172
|
+
replaceContent = newLinesAndIndent();
|
|
173
|
+
}
|
|
174
|
+
else if (secondToken === 6 /* SyntaxKind.ColonToken */ && !needsLineBreak) {
|
|
175
|
+
replaceContent = '';
|
|
176
|
+
}
|
|
177
|
+
break;
|
|
178
|
+
case 7 /* SyntaxKind.NullKeyword */:
|
|
179
|
+
case 8 /* SyntaxKind.TrueKeyword */:
|
|
180
|
+
case 9 /* SyntaxKind.FalseKeyword */:
|
|
181
|
+
case 11 /* SyntaxKind.NumericLiteral */:
|
|
182
|
+
case 2 /* SyntaxKind.CloseBraceToken */:
|
|
183
|
+
case 4 /* SyntaxKind.CloseBracketToken */:
|
|
184
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
185
|
+
replaceContent = newLinesAndIndent();
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
if ((secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */) && !needsLineBreak) {
|
|
189
|
+
replaceContent = cachedSpaces[1];
|
|
190
|
+
}
|
|
191
|
+
else if (secondToken !== 5 /* SyntaxKind.CommaToken */ && secondToken !== 17 /* SyntaxKind.EOF */) {
|
|
192
|
+
hasError = true;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
case 16 /* SyntaxKind.Unknown */:
|
|
197
|
+
hasError = true;
|
|
198
|
+
break;
|
|
199
|
+
}
|
|
200
|
+
if (numberLineBreaks > 0 && (secondToken === 12 /* SyntaxKind.LineCommentTrivia */ || secondToken === 13 /* SyntaxKind.BlockCommentTrivia */)) {
|
|
201
|
+
replaceContent = newLinesAndIndent();
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (secondToken === 17 /* SyntaxKind.EOF */) {
|
|
205
|
+
if (options.keepLines && numberLineBreaks > 0) {
|
|
206
|
+
replaceContent = newLinesAndIndent();
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
replaceContent = options.insertFinalNewline ? eol : '';
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const secondTokenStart = scanner.getTokenOffset() + formatTextStart;
|
|
213
|
+
addEdit(replaceContent, firstTokenEnd, secondTokenStart);
|
|
214
|
+
firstToken = secondToken;
|
|
215
|
+
}
|
|
216
|
+
return editOperations;
|
|
217
|
+
}
|
|
218
|
+
function repeat(s, count) {
|
|
219
|
+
let result = '';
|
|
220
|
+
for (let i = 0; i < count; i++) {
|
|
221
|
+
result += s;
|
|
222
|
+
}
|
|
223
|
+
return result;
|
|
224
|
+
}
|
|
225
|
+
function computeIndentLevel(content, options) {
|
|
226
|
+
let i = 0;
|
|
227
|
+
let nChars = 0;
|
|
228
|
+
const tabSize = options.tabSize || 4;
|
|
229
|
+
while (i < content.length) {
|
|
230
|
+
let ch = content.charAt(i);
|
|
231
|
+
if (ch === cachedSpaces[1]) {
|
|
232
|
+
nChars++;
|
|
233
|
+
}
|
|
234
|
+
else if (ch === '\t') {
|
|
235
|
+
nChars += tabSize;
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
break;
|
|
239
|
+
}
|
|
240
|
+
i++;
|
|
241
|
+
}
|
|
242
|
+
return Math.floor(nChars / tabSize);
|
|
243
|
+
}
|
|
244
|
+
function getEOL(options, text) {
|
|
245
|
+
for (let i = 0; i < text.length; i++) {
|
|
246
|
+
const ch = text.charAt(i);
|
|
247
|
+
if (ch === '\r') {
|
|
248
|
+
if (i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
249
|
+
return '\r\n';
|
|
250
|
+
}
|
|
251
|
+
return '\r';
|
|
252
|
+
}
|
|
253
|
+
else if (ch === '\n') {
|
|
254
|
+
return '\n';
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return (options && options.eol) || '\n';
|
|
258
|
+
}
|
|
259
|
+
export function isEOL(text, offset) {
|
|
260
|
+
return '\r\n'.indexOf(text.charAt(offset)) !== -1;
|
|
261
|
+
}
|