diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 14:46:37 -0800 |
| commit | afa87af01c79a9baa539f2992d32154d2a4739bd (patch) | |
| tree | 92c7416db734270a2fee1d72ee9cc119379ff8e1 /vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js | |
| parent | 3b927e84d200402281f68181cd4253bc77e5528d (diff) | |
| download | neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.gz neko-afa87af01c79a9baa539f2992d32154d2a4739bd.tar.bz2 neko-afa87af01c79a9baa539f2992d32154d2a4739bd.zip | |
task: delete vanilla js prototype\n\n- Removed vanilla/ directory and web/dist/vanilla directory\n- Updated Makefile, Dockerfile, and CI workflow to remove vanilla references\n- Cleaned up web/web.go to remove vanilla embed and routes\n- Verified build and tests pass\n\nCloses NK-2tcnmq
Diffstat (limited to 'vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js')
| -rw-r--r-- | vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js b/vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js deleted file mode 100644 index 6f80642..0000000 --- a/vanilla/node_modules/istanbul-reports/lib/html/insertion-text.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; -/* - Copyright 2012-2015, Yahoo Inc. - Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. - */ -function InsertionText(text, consumeBlanks) { - this.text = text; - this.origLength = text.length; - this.offsets = []; - this.consumeBlanks = consumeBlanks; - this.startPos = this.findFirstNonBlank(); - this.endPos = this.findLastNonBlank(); -} - -const WHITE_RE = /[ \f\n\r\t\v\u00A0\u2028\u2029]/; - -InsertionText.prototype = { - findFirstNonBlank() { - let pos = -1; - const text = this.text; - const len = text.length; - let i; - for (i = 0; i < len; i += 1) { - if (!text.charAt(i).match(WHITE_RE)) { - pos = i; - break; - } - } - return pos; - }, - findLastNonBlank() { - const text = this.text; - const len = text.length; - let pos = text.length + 1; - let i; - for (i = len - 1; i >= 0; i -= 1) { - if (!text.charAt(i).match(WHITE_RE)) { - pos = i; - break; - } - } - return pos; - }, - originalLength() { - return this.origLength; - }, - - insertAt(col, str, insertBefore, consumeBlanks) { - consumeBlanks = - typeof consumeBlanks === 'undefined' - ? this.consumeBlanks - : consumeBlanks; - col = col > this.originalLength() ? this.originalLength() : col; - col = col < 0 ? 0 : col; - - if (consumeBlanks) { - if (col <= this.startPos) { - col = 0; - } - if (col > this.endPos) { - col = this.origLength; - } - } - - const len = str.length; - const offset = this.findOffset(col, len, insertBefore); - const realPos = col + offset; - const text = this.text; - this.text = text.substring(0, realPos) + str + text.substring(realPos); - return this; - }, - - findOffset(pos, len, insertBefore) { - const offsets = this.offsets; - let offsetObj; - let cumulativeOffset = 0; - let i; - - for (i = 0; i < offsets.length; i += 1) { - offsetObj = offsets[i]; - if ( - offsetObj.pos < pos || - (offsetObj.pos === pos && !insertBefore) - ) { - cumulativeOffset += offsetObj.len; - } - if (offsetObj.pos >= pos) { - break; - } - } - if (offsetObj && offsetObj.pos === pos) { - offsetObj.len += len; - } else { - offsets.splice(i, 0, { pos, len }); - } - return cumulativeOffset; - }, - - wrap(startPos, startText, endPos, endText, consumeBlanks) { - this.insertAt(startPos, startText, true, consumeBlanks); - this.insertAt(endPos, endText, false, consumeBlanks); - return this; - }, - - wrapLine(startText, endText) { - this.wrap(0, startText, this.originalLength(), endText); - }, - - toString() { - return this.text; - } -}; - -module.exports = InsertionText; |
