npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

caitlyn.js

v2.3.3

Published

복잡한 라이엇 API에서 필요한 정보만 쉽게 가져올 수 있게 해줍니다.

Readme

Caitlyn.js Preview

🎉 2.2 업데이트

  • 코드를 비동기 방식으로 갈아 엎었어요!

🎉 2.1 업데이트

  • 닉네임-태그 체계를 적용하였어요.

설치

  1. 이 레포지토리를 프로젝트 폴더 안에 복제 하세요.
  2. const caitlyn = require("./Caitlyn.js");

사용법

  • 사전 토큰 설정

caitlyn.setToken( 토큰 );

caitlyn.setToken(토큰);

토큰은 아래와 같이 dotenv를 사용하여 관리하는 것을 매우 권장합니다.

index.js

require("dotenv").config();
caitlyn.setToken(process.env.RIOT_API);

.env

RIOT_API=RGAPI-...
  • 소환사의 정보 불러오기

caitlyn.getSummoner( 소환사 이름, 태그 );

let summoner = await caitlyn.getSummoner(소환사 이름, 태그);
console.log(summoner);
  • Return
    • id
    • level
    • name
    • tag
    • profileIconId
    • puuid
    • rank
      • ranked_flex (자유 랭크)
        • losses
        • lp
        • tier
        • wins
        • hotStreak (연승)
      • ranked_solo (솔로 랭크)
        • losses
        • lp
        • tier
        • wins
        • hotStreak (연승)
    • now (플레이 중 일 때)
      • queueId
      • time (초 단위)
      • champ

summoner.profileIconId 같은 경우

console.log("https://ddragon.leagueoflegends.com/cdn/" + ddver[0] + "/img/profileicon/" + summoner.profileIconId + ".png");

로 소환사의 프로필 사진을 가져올 수 있습니다. ddver[0] 은 아래의 DDragon - version 함수를 참고해주세요.

summoner.now.queueId 같은 경우

let queinf = await caitlyn.ddragon.queueInfo(summoner.now.queueId);

로 현재 플레이 중인 게임이 무엇인지 ( ex. 칼바람나락, URF ) 찾을 수 있습니다.

summoner.now.time 같은 경우

let time_tmp = Math.floor(summoner.now.time / 60);
console.log("**" + time_tmp + "** 분 **" + (summoner.now.time - (time_tmp * 60)) + "** 초");

와 같이 사용하시면 됩니다.

caitlyn.getRecentMatch( summoner, count );

let summoner = await caitlyn.getSummoner(소환사 이름, 태그);
console.log(summoner);

let matchs = await caitlyn.getRecentMatch(summoner, 5);
console.log(matchs);
//최근 5개 게임 정보
  • Return
    • (게임 번호)
      • champ
        • name
        • level (게임에서의 최종 레벨)
      • dodge (닷지 여부)
      • duration (게임 길이, 초 단위)
      • firstblood (퍼블 여부)
      • gold
      • kda ('/' 로 끊어져서 나옴 - ex. 10/4/6)
      • multiKill (최대 다중 킬 - 1 > X, 2 > 더블킬, 3 > 트리플킬)
      • queueId
      • time (언제 한건지, unixtimestamp)
      • win
    • (게임 번호) ...

Caitlyn DDragon

  • DDragon 최신 버전 가져오기

caitlyn.ddragon.version();

let ddver = await caitlyn.ddragon.version();
console.log(ddver[0]);
//DDragon 최신 버전
  • Queue ID 로 게임 속성 불러오기

caitlyn.ddragon.queueInfo( Queue ID );

let queinf = await caitlyn.ddragon.queueInfo(440);
console.log(queinf);
//자유랭크