Skip to content
View gaievskyi's full-sized avatar
Wizzing
Wizzing

Block or report gaievskyi

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
gaievskyi/README.md

👋 I'm Daniel, a Software Engineer.

Pinned Loading

  1. Make a class Singleton using decorat... Make a class Singleton using decorator (via Proxy). Enable decorators by setting "experimentalDecorators": true in your tsconfig.json.
    1
    import { describe, expect, it } from "bun:test"
    2
    import { Singleton } from "./singleton"
    3
    
                  
    4
    describe("@Singleton", () => {
    5
      it("makes class singleton", () => {
  2. Relative time ago Relative time ago
    1
    
                  
    2
    function timeAgo(time: number, now = Date.now()) {
    3
      const is = (interval: number, cycle: number) =>
    4
        cycle >= interval ? Math.round(cycle / interval) : 0
    5