import { Injectable } from '@angular/core'; import * as Hashids from 'hashids'; @Injectable() export class DnHashId { hashids = new Hashids('gher5tvw5tc12tre3ascpiombnu2a0', 10); decode(id: string): number { return this.hashids.decode(id); } encode(id: number): string { return this.hashids.encode(id); } }