Linux bear.hostingplus.cl 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
LiteSpeed
Server IP : 192.140.57.17 & Your IP : 216.73.216.106
Domains :
Cant Read [ /etc/named.conf ]
User : explo
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
bitninja-dispatcher /
node_modules /
logform /
Delete
Unzip
Name
Size
Permission
Date
Action
dist
[ DIR ]
drwxr-xr-x
2026-02-20 01:17
examples
[ DIR ]
drwxr-xr-x
2026-02-20 01:17
.babelrc
42
B
-rw-r--r--
2026-02-18 13:02
.eslintrc
105
B
-rw-r--r--
2026-02-18 13:02
.gitattributes
26
B
-rw-r--r--
2026-02-18 13:02
CHANGELOG.md
8.54
KB
-rw-r--r--
2026-02-18 13:02
LICENSE
1.09
KB
-rw-r--r--
2026-02-18 13:02
README.md
18.3
KB
-rw-r--r--
2026-02-18 13:02
align.js
367
B
-rw-r--r--
2026-02-18 13:02
browser.js
1.72
KB
-rw-r--r--
2026-02-18 13:02
cli.js
1.19
KB
-rw-r--r--
2026-02-18 13:02
colorize.js
2.97
KB
-rw-r--r--
2026-02-18 13:02
combine.js
1.76
KB
-rw-r--r--
2026-02-18 13:02
errors.js
1.07
KB
-rw-r--r--
2026-02-18 13:02
format.js
1.14
KB
-rw-r--r--
2026-02-18 13:02
index.d.ts
5.88
KB
-rw-r--r--
2026-02-18 13:02
index.js
1.83
KB
-rw-r--r--
2026-02-18 13:02
json.js
983
B
-rw-r--r--
2026-02-18 13:02
label.js
469
B
-rw-r--r--
2026-02-18 13:02
levels.js
251
B
-rw-r--r--
2026-02-18 13:02
logstash.js
759
B
-rw-r--r--
2026-02-18 13:02
metadata.js
1.3
KB
-rw-r--r--
2026-02-18 13:02
ms.js
430
B
-rw-r--r--
2026-02-18 13:02
package.json
2.18
KB
-rw-r--r--
2026-02-18 13:02
pad-levels.js
2.81
KB
-rw-r--r--
2026-02-18 13:02
pretty-print.js
899
B
-rw-r--r--
2026-02-18 13:02
printf.js
515
B
-rw-r--r--
2026-02-18 13:02
simple.js
979
B
-rw-r--r--
2026-02-18 13:02
splat.js
4.17
KB
-rw-r--r--
2026-02-18 13:02
timestamp.js
757
B
-rw-r--r--
2026-02-18 13:02
tsconfig.json
406
B
-rw-r--r--
2026-02-18 13:02
uncolorize.js
705
B
-rw-r--r--
2026-02-18 13:02
Save
Rename
/* eslint no-unused-vars: 0 */ 'use strict'; const { configs, LEVEL, MESSAGE } = require('triple-beam'); class Padder { constructor(opts = { levels: configs.npm.levels }) { this.paddings = Padder.paddingForLevels(opts.levels, opts.filler); this.options = opts; } /** * Returns the maximum length of keys in the specified `levels` Object. * @param {Object} levels Set of all levels to calculate longest level against. * @returns {Number} Maximum length of the longest level string. */ static getLongestLevel(levels) { const lvls = Object.keys(levels).map(level => level.length); return Math.max(...lvls); } /** * Returns the padding for the specified `level` assuming that the * maximum length of all levels it's associated with is `maxLength`. * @param {String} level Level to calculate padding for. * @param {String} filler Repeatable text to use for padding. * @param {Number} maxLength Length of the longest level * @returns {String} Padding string for the `level` */ static paddingForLevel(level, filler, maxLength) { const targetLen = maxLength + 1 - level.length; const rep = Math.floor(targetLen / filler.length); const padding = `${filler}${filler.repeat(rep)}`; return padding.slice(0, targetLen); } /** * Returns an object with the string paddings for the given `levels` * using the specified `filler`. * @param {Object} levels Set of all levels to calculate padding for. * @param {String} filler Repeatable text to use for padding. * @returns {Object} Mapping of level to desired padding. */ static paddingForLevels(levels, filler = ' ') { const maxLength = Padder.getLongestLevel(levels); return Object.keys(levels).reduce((acc, level) => { acc[level] = Padder.paddingForLevel(level, filler, maxLength); return acc; }, {}); } /** * Prepends the padding onto the `message` based on the `LEVEL` of * the `info`. This is based on the behavior of `winston@2` which also * prepended the level onto the message. * * See: https://github.com/winstonjs/winston/blob/2.x/lib/winston/logger.js#L198-L201 * * @param {Info} info Logform info object * @param {Object} opts Options passed along to this instance. * @returns {Info} Modified logform info object. */ transform(info, opts) { info.message = `${this.paddings[info[LEVEL]]}${info.message}`; if (info[MESSAGE]) { info[MESSAGE] = `${this.paddings[info[LEVEL]]}${info[MESSAGE]}`; } return info; } } /* * function padLevels (info) * Returns a new instance of the padLevels Format which pads * levels to be the same length. This was previously exposed as * { padLevels: true } to transports in `winston < 3.0.0`. */ module.exports = opts => new Padder(opts); module.exports.Padder = module.exports.Format = Padder;