Files
actions-ansi-to-html/node_modules/strip-indent/index.js
T
2025-11-11 06:53:11 -05:00

15 lines
257 B
JavaScript

'use strict';
const minIndent = require('min-indent');
module.exports = string => {
const indent = minIndent(string);
if (indent === 0) {
return string;
}
const regex = new RegExp(`^[ \\t]{${indent}}`, 'gm');
return string.replace(regex, '');
};