Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
cf9bdca2ba | |||
0e2d720fdf | |||
061e27d92a |
3
.github/workflows/build.yaml
vendored
3
.github/workflows/build.yaml
vendored
@ -25,6 +25,9 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npm i
|
run: npm i
|
||||||
|
|
||||||
|
- name: Build Project
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: npm run test:coverage
|
run: npm run test:coverage
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@ztimson/js-utilities",
|
"name": "@ztimson/js-utilities",
|
||||||
"version": "0.3.1",
|
"version": "0.3.3",
|
||||||
"description": "JavaScript Utility library",
|
"description": "JavaScript Utility library",
|
||||||
"author": "Zak Timson",
|
"author": "Zak Timson",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -13,7 +13,6 @@
|
|||||||
"module": "./dist/js-utilities.mjs",
|
"module": "./dist/js-utilities.mjs",
|
||||||
"types": "./dist/src/index.d.ts",
|
"types": "./dist/src/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "npm run build",
|
|
||||||
"build": "npx vite build",
|
"build": "npx vite build",
|
||||||
"test": "npx jest",
|
"test": "npx jest",
|
||||||
"test:coverage": "npx jest --coverage",
|
"test:coverage": "npx jest --coverage",
|
||||||
|
@ -62,11 +62,12 @@ export class Logger extends TypedEmitter<LoggerEvents> {
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
private pad(text: string, length: number, char: string, end = false) {
|
private pad(text: any, length: number, char: string, end = false) {
|
||||||
const l = length - text.length;
|
const t = text.toString();
|
||||||
if(l <= 0) return text;
|
const l = length - t.length;
|
||||||
|
if(l <= 0) return t;
|
||||||
const padding = Array(~~(l / char.length)).fill(char).join('');
|
const padding = Array(~~(l / char.length)).fill(char).join('');
|
||||||
return !end ? padding + text : text + padding;
|
return !end ? padding + t : t + padding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user