MCPcopy
hub / github.com/witheve/Eve / dedent

Function dedent

test/shared_functions.ts:9–23  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

7import {BrowserSessionDatabase} from "../src/runtime/databases/browserSession";
8
9export function dedent(str) {
10 let lines = [];
11 let indent;
12 for(let line of str.split("\n")) {
13 let match = line.match(/^[ \t]+/);
14 if(match) {
15 if(!indent) {
16 indent = match[0].length;
17 }
18 line = line.substr(indent);
19 }
20 lines.push(line);
21 }
22 return lines.join("\n");
23}
24
25export function eavsToComparables(eavs, entities, index = {}) {
26 let results = [];

Callers 2

evaluateFunction · 0.85
evaluatesFunction · 0.85

Calls 1

matchMethod · 0.80

Tested by

no test coverage detected