MCPcopy Create free account
hub / github.com/compat-table/compat-table / deindentFunc

Function deindentFunc

build.js:724–731  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

722function testScript(fn, transformFn, rowNum) {
723
724 function deindentFunc(fn) {
725 fn = (fn+'');
726 var indent = /(?:^|\n)([\t ]+)[^\n]+/.exec(fn);
727 if (indent) {
728 fn = fn.replace(new RegExp('\n' + indent[1], 'g'), '\n');
729 }
730 return fn;
731 }
732
733 if (!fn) {
734 return '';

Callers 1

testScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected