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 🙏

© 2026 – Pkg Stats / Ryan Hefner

laftel-sdk

v1.0.3

Published

Unofficial High-Performance TypeScript SDK for Laftel.net API

Readme

laftel-sdk


라프텔(Laftel.net)의 애니메이션 정보 검색 및 회차 목록을 손쉽게 조회할 수 있는 고성능 비공식 TypeScript/JavaScript SDK입니다. Node.js 공식 고성능 HTTP 클라이언트인 undici 저수준 엔진pnpm 기반의 초고속 패키지 관리 환경을 갖추고 있습니다.

특징 (Features)

  • 초고속 통신: undici.Agent 기반의 Keep-Alive 커넥션 풀링 및 HTTP 파이프라이닝 지원
  • pnpm 최적화: 빠르고 엄격한 의존성 관리 및 디스크 절약
  • TypeScript 퍼스트: 완벽한 타입 추론과 모듈형 도메인 인터페이스 제공
  • 독립적 설계: 어떠한 레거시 라이선스 종속성도 없는 클린룸 아키텍처 (MIT License)
  • 듀얼 모듈 지원: ESM(import)과 CommonJS(require) 모두 호환

설치 (Installation)

pnpm add laftel-sdk
# 또는 npm / yarn / bun
npm install laftel-sdk
yarn add laftel-sdk
bun add laftel-sdk

개발 및 빌드 (Development)

# 의존성 설치
pnpm install

# 번들 빌드 (tsup)
pnpm run build

# 개발 모드 (watch)
pnpm run dev

사용법 (Usage)

1. 객체지향형 SDK 인스턴스 사용 (추천)

import { LaftelSdk } from "laftel-sdk"

// 고성능 커넥션 풀링 옵션 지원
const laftel = new LaftelSdk({
    connections: 50, // 최대 동시 연결 수
    pipelining: 10, // 파이프라이닝 수
    timeoutDurationMs: 5000, // 타임아웃
})

async function main() {
    // 1. 검색 도메인 서비스
    const searchResults = await laftel.search.byKeyword("귀멸의 칼날")
    console.log(searchResults[0])

    if (searchResults.length > 0) {
        const itemId = searchResults[0].itemId

        // 2. 작품 상세 정보 도메인 서비스
        const detail = await laftel.items.getById(itemId)
        console.log(`작품명: ${detail.title}`)
        console.log(`평점: ${detail.score}`)

        // 3. 에피소드(회차) 도메인 서비스
        const episodes = await laftel.episodes.getByItemId(itemId)
        console.log(`총 회차 수: ${episodes.length}`)
    }

    // 애플리케이션 종료 시 풀 정리
    await laftel.close()
}

main()

2. 간편 함수 직접 호출

import { searchByKeyword, getItemDetail, getEpisodes } from "laftel-sdk"

async function main() {
    const list = await searchByKeyword("진격의 거인")
    if (list.length > 0) {
        const item = await getItemDetail(list[0].itemId)
        console.log(item.title)
    }
}

main()

라이선스 (License)

MIT License