comcigan.ts
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

comcigan.ts

npm version License

컴시간알리미를 파싱하는 TypeScript 라이브러리입니다.

컴시간알리미의 구조 및 파싱 방법은 docs/README.md를 참고해주세요.

설치

npm install comcigan.ts  # npm
yarn add comcigan.ts  # yarn
pnpm add comcigan.ts  # pnpm

사용 예시

import Comcigan, { School, Weekday } from 'comcigan.ts'

const comcigan = new Comcigan()

const main = async () => {
  const searchedSchools = await comcigan.searchSchools('학교 이름') // 학교 검색
  const school = await School.fromName('학교 이름') // 바로 불러오기 (== searchedSchools[0])

  console.log(await school.getTimetable(3, 3, Weekday.Friday)) // 3학년 3반 금요일 시간표
  console.log(await comcigan.getTimetable(school.code, 3, 3, Weekday.Friday)) // 학교 코드를 이용하는 방법
}

main()

Package Sidebar

Install

npm i comcigan.ts

Weekly Downloads

4

Version

1.2.2

License

LGPL-3.0-or-later

Unpacked Size

54 kB

Total Files

49

Last publish

Collaborators

  • starcea