Skip to content

Commit 8815675

Browse files
committed
build: remove deprecated lib "left-pad"
1 parent 81c92fc commit 8815675

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

package-lock.json

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
"keycloak-angular": "^13.0.0",
4242
"keycloak-js": "^20.0.5",
4343
"leaflet": "^1.9.3",
44-
"left-pad": "^1.3.0",
4544
"lodash.escaperegexp": "^4.1.2",
4645
"messageformat": "^2.3.0",
4746
"moment": "^2.29.4",

src/app/paginator/paginator/paginator.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import {Component, Input} from '@angular/core';
2-
import * as leftPad from 'left-pad';
32
import {APIPaginator} from '../../services/api.service';
43
import {Pages} from '@grpc/spec.pb';
54

@@ -16,6 +15,6 @@ export class PaginatorComponent {
1615

1716
public padd(page: number): string {
1817
const size = Math.max(2, this.data.pageCount.toString().length);
19-
return leftPad(page, size, '0');
18+
return page.toString().padStart(size, '0');
2019
}
2120
}

src/app/picture/paginator.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import {Component, Input} from '@angular/core';
22
import {APIPicturePaginator} from '../services/picture';
3-
import * as leftPad from 'left-pad';
43

54
@Component({
65
selector: 'app-picture-paginator',
@@ -13,6 +12,6 @@ export class PicturePaginatorComponent {
1312
public format(page, count) {
1413
const size = Math.max(2, count.toString().length);
1514

16-
return leftPad(page, size, '0');
15+
return page.toString().padStart(size, '0');
1716
}
1817
}

0 commit comments

Comments
 (0)