Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /usr/local/share/.cache/yarn/v6/npm-de-indent-1.0.2-integrity/node_modules/de-indent/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var splitRE = /\r?\n/g
var emptyRE = /^\s*$/
var needFixRE = /^(\r?\n)*[\t\s]/
module.exports = function deindent (str) {
if (!needFixRE.test(str)) {
return str
}
var lines = str.split(splitRE)
var min = Infinity
var type, cur, c
for (var i = 0; i < lines.length; i++) {
var line = lines[i]
if (!emptyRE.test(line)) {
if (!type) {
c = line.charAt(0)
if (c === ' ' || c === '\t') {
type = c
cur = count(line, type)
if (cur < min) {
min = cur
}
} else {
return str
}
} else {
cur = count(line, type)
if (cur < min) {
min = cur
}
}
}
}
return lines.map(function (line) {
return line.slice(min)
}).join('\n')
}
function count (line, type) {
var i = 0
while (line.charAt(i) === type) {
i++
}
return i
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0085 ]-- |