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

kodik

v0.0.2

Published

Universal kodikapi.com API wrapper for modern Javascript

Readme

NPM version NPM downloads donate install size

Репозиторий проекта - github.com/mirasayon/kodik.js

Ссылка на NPM пакет - npmjs.com/package/kodik

Библиотека kodik - это обёртка над API kodikapi.com

Вы можете исползовать эту библиотеку и на клиенте и на сервере

Поддерживается Node.js версии 18 и выше

Поддерживает работу в альтернативных рантаймах JS как Deno, Bun

Библиотека написана только на модулях ESM (Подробнее о ESM)

Установка

Если вы исползуете стандартный пакетный менеджер для Node.js - NPM:

npm i kodik

или если вы исползуете yarn:

yarn add kodik

если pnpm:

pnpm add kodik

Использования

Класс ApiClient

Класс ApiClient реализует все доступные эндпоинты из API.

Документация по Kodik API: https://bd.kodik.biz/api/info. (Авторизация обязательна)

Все методы будут называться так же как и названия эндпоинтов.

Например для роута /list используется медот client.list({...}), для роута /search используется медот client.search({...}) и так далее.

Параметры для создания клиента

  • token - Ваш токен для выполнения запросов к API. Обязательный параметр

  • kodikApiUrl - Вы можете передать сюда изменёный URL для выполнения запросов. Например, с измененым протоколом По умолчанию будет исползоваться URL c HTTPS протоколом: https://kodikapi.com. Но если вы хотите поменять это (например исползовать HTTP), то просто перепишите как http://kodikapi.com

  • refineFetch - Пользовательская функция для выполнения HTTP-запросов. По умолчанию используется стандартная fetch() функция который есть и в браузере и в сервере (Node.js). Можно передать собственную реализацию для своих нужд, например для кэширования или для использования другой библиотеки HTTP-клиента. Например, в веб приложении Next.js стандартная fetch() функция (только в серверной части, в браузере fetch останется обычным) переопределятся и добавляютя дополнителные параметры типа { next: { revalidate: 3600 } } или { cache: 'force-cache' }) В таком случае, вам стоит передать свою реализацию:

Пример исползования в Next.js:

    refineFetch: (url) => fetch(url, { next: { revalidate: 3600 } }),

Использование клиента ApiClient

import { ApiClient } from "kodik";
// Создание API клиента
const client = new ApiClient({
    token: "ВАШ ТОКЕН",
});

const res = await client.search({
    limit: 1,
    types: ["anime-serial"],
    has_field: "shikimori_id",
    title: "Наруто",
});
const data = res.results[0] || null;
console.log(data);
// {
//   id: 'serial-16000',
//   type: 'anime-serial',
//   link: '//kodik.info/serial/16000/cc56d0ae4cb1000a98d09a0bce8f90a9/720p',
//   title: 'Тиби Наруто: Весна юности Рока Ли',
//   title_orig: 'Naruto SD: Rock Lee no Seishun Full-Power Ninden',
//   other_title: 'ЧИБИ Наруто - Весна Юности Рока Ли / Naruto Spin-Off: Rock Lee & His Ninja Pals',
//   translation: { id: 767, title: 'SHIZA Project', type: 'voice' },
//   year: 2012,
//   last_season: 1,
//   last_episode: 51,
//   episodes_count: 51,
//   kinopoisk_id: '679735',
//   imdb_id: 'tt2301807',
//   worldart_link: 'http://www.world-art.ru/animation/animation.php?id=386',
//   shikimori_id: '12979',
//   quality: 'HDTVRip 720p',
//   camrip: false,
//   lgbt: false,
//   blocked_countries: [],
//   blocked_seasons: {},
//   created_at: '2019-03-23T09:08:53Z',
//   updated_at: '2019-12-14T11:56:43Z',
//   screenshots: [
//     'https://i.kodik.biz/screenshots/seria/419212/1.jpg',
//     'https://i.kodik.biz/screenshots/seria/419212/2.jpg',
//     'https://i.kodik.biz/screenshots/seria/419212/3.jpg',
//     'https://i.kodik.biz/screenshots/seria/419212/4.jpg',
//     'https://i.kodik.biz/screenshots/seria/419212/5.jpg'
//   ]
// }

Typescript

Все типы готовые и доступны из коробки

Лицензия

MIT