Minor updates
This commit is contained in:
parent
51f3d7502b
commit
fad201fcc6
@ -23,7 +23,7 @@ export interface QueryParam {
|
|||||||
*/
|
*/
|
||||||
export abstract class GenericService<I> {
|
export abstract class GenericService<I> {
|
||||||
protected readonly _http = this._injector.get(HttpClient);
|
protected readonly _http = this._injector.get(HttpClient);
|
||||||
private readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, '0']]);
|
protected readonly _lastCheckedForChanges = new Map<string, string>([[ROOT_CHANGES_KEY, '0']]);
|
||||||
|
|
||||||
protected constructor(protected readonly _injector: Injector, protected readonly _defaultModelPath: string) {}
|
protected constructor(protected readonly _injector: Injector, protected readonly _defaultModelPath: string) {}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { HttpClient } from '@angular/common/http';
|
|||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
import { HeadersConfiguration, mapEach, RequiredParam, Validate } from '../utils';
|
import { HeadersConfiguration, mapEach, RequiredParam, Validate } from '../utils';
|
||||||
|
|
||||||
|
/* WIP, not used */
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export abstract class StatsService<E, I = E> {
|
export abstract class StatsService<E, I = E> {
|
||||||
private readonly _http = this._injector.get(HttpClient);
|
private readonly _http = this._injector.get(HttpClient);
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { tap } from 'rxjs/operators';
|
import { tap } from 'rxjs/operators';
|
||||||
import { ITrackable } from '../listing/models/trackable';
|
import { ITrackable } from '../listing/models/trackable';
|
||||||
import { MonoTypeOperatorFunction } from 'rxjs';
|
import { MonoTypeOperatorFunction } from 'rxjs';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
export function capitalize(value: string): string {
|
export function capitalize(value: string): string {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@ -19,7 +20,7 @@ export function humanize(value: string, lowercase = true): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function log<T>(): MonoTypeOperatorFunction<T> {
|
export function log<T>(): MonoTypeOperatorFunction<T> {
|
||||||
return tap<T>(res => console.log(res));
|
return tap<T>(res => console.log(`%c[${moment().format('HH:mm:ss.SSS')}]`, 'color: yellow;', res));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toNumber(str: string): number {
|
export function toNumber(str: string): number {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user