mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-28 20:54:46 +01:00
14 lines
257 B
JavaScript
14 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, '');
|
|
};
|