Skip to main content

Selfcheck (Deno) - 자가진단 자동화 CI deno land npm GitHub stars

SELFCHECK HOME NODEJS VERSION

How To Use

  1. https://deno.land/ 에서 Deno 설치
  2. 예제 실행

Basic Usage

// main.ts
import selfcheck from 'https://deno.land/x/selfcheck/mod.ts';

console.log(
  await selfcheck({
    name: '실명',
    birthday: '생일',
    school: '학교',
    area: '지역',
    password: '비밀번호',
  })
);

// $ deno run -A main.ts

Cron Usage (매일 아침 7시에 실행)

// main.ts
import selfcheck from 'https://deno.land/x/selfcheck/mod.ts';
import { cron } from 'https://deno.land/x/deno_cron/cron.ts';

cron('0 7 * * *', async () => {
  console.log(
    await selfcheck({
      name: '실명',
      birthday: '생일',
      school: '학교',
      area: '지역',
      password: '비밀번호',
    })
  );
});

// $ deno run -A main.ts

Documents

export interface User {
  /**
   * 실명
   */
  name: string;
  /**
   * 학교명
   */
  school: string;
  /**
   * 지역명
   */
  area: string;
  /**
   * 생일
   */
  birthday: string;
  /**
   * 자가진단 비밀번호
   */
  password: string;
}

type SelfcheckResult = {
  registerDtm: string;
  inveYmd: string;
};

/**
 * 자가진단을 수행
 * @param user 개인정보
 */
function selfcheck(user: User): Promise<SelfcheckResult>;

/**
 * 정상적으로 작동하는지 여부 확인
 * @param user 개인정보
 */
function validate(user: User): Promise<boolean>;