Something went wrong. Try again.
because I got bored of customising my CV for every job
Something went wrong. Try again.
TypeScript
12345678910111213141516171819import { Injectable } from "@nestjs/common";
@Injectable()export class CursorService { /** * Encode an ID to a cursor */ encode(id: string): string { return Buffer.from(id).toString("base64"); }
/** * Decode a cursor to get the ID */ decode(cursor: string): string { return Buffer.from(cursor, "base64").toString("utf-8"); }}