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 🙏

© 2024 – Pkg Stats / Ryan Hefner

aniki

v1.2.2

Published

Aniki is a module using APIs to obtain information about an anime or manga.

Downloads

605

Readme

Installation

With NPM:

npm i aniki

Alpha

An alpha version (1.3.0) will be released soon as possible (I WORK A LOT FOR NOTHING LOL), the module has been restructured in TypeScript, you can still use it in JavaScript ESM.

Api used

Kitsu.io (For anime and manga)

Helping

Do you have an anime/manga api to suggest? Tell me in X! (The api must not have an access key.)

Usage

With Kitsu:

const { AnimeKitsu } = require("aniki/kitsu");

const anime = new AnimeKitsu();

// Find anime.
anime.find("name").then(results => {
	console.log(results.data[0]) // The 0 is the first result, data are required.

    // Tips: If you want to make sure you have any data, make a condition like this:
    if (results.data.length > 0) {
        // ...
    } else {
        // ...
    }
});

// All list from the page, 
anime.list(0).then(animes => { // 0 is the offset (first page)
  console.log(animes)
});

With Kitsu for manga:

const { MangaKitsu } = require("aniki/kitsu");

const manga = new MangaKitsu();

// Find anime.
manga.find("name", 0).then(results => {
    console.log(results.data[0]);
});

// Get a list.
manga.list(0).then(mangas => {
    console.log(mangas);
});

Important

If you use all function at one time, use asynchronous function:

async function yourFunc() {
  await anime.find("name", 0).then(results => {
	  console.log(results.data[0]);
  });
 
  await anime.list(0).then(animes => {
	  console.log(animes.data[0]);
  });

  await manga.find("name", 0).then(results => {
    console.log(results.data[0]);
  });
  // ...
};
yourFunc();

Kitsu Anime Response

|Attributes|Description|Type| |---|---|---| |titles|All type of title|object| |titles > en|The english title|string| |titles > jp|The japanese title|string| |titles > ja_jp|The japanese character title|string| |canonicalTitle|The canonical title|string| |abbreviatedTitles|The abbreviated titles|array| |synopsis|The synopsis of the anime (description)|string| |createdAt|The creation date (ISO 8601)|string| |startAt|The start date (YYYY-MM-DD)|string| |updatedAt|The updated date (ISO 8601)|string| |endAt|The end date (YYYY-MM-DD)|string| |posterImage|The poster image|object| |posterImage > tiny|The tiny poster image|string| |posterImage > small|The small poster image|string| |posterImage > medium|The medium poster image|string| |posterImage > large|The large poster image|string| |posterImage > original|The original poster image|string| |coverImage|The poster image|object| |coverImage > tiny|The tiny poster image|string| |coverImage > small|The small poster image|string| |coverImage > large|The large poster image|string| |posterImage > original|The original poster image|string| |episodeCount|The number of episodes|number| |episodeLength|The approximative duration of the episode|number| |nsfw|If the anime are NSFW content or not (must use authentication system.)|boolean| |youtubeVideoId|The trailer video id|string| |ageRating|The age rating|"enum"| |subtype|The subtype|"enum"|

Kitsu JSON Response

Example with an anime search

{
    "data": [
        {
            "id": "",
            "type": "",
            "links": {
                "self": ""
            },
            "attributes": {
                "createdAt": "",
                "updatedAt": "",
                "slug": "",
                "synopsis": "",
                "description": "",
                "coverImageTopOffset": 0,
                "titles": {
                    "en_jp": "",
                    "ja_jp": ""
                },
                "canonicalTitle": "",
                "abbreviatedTitles": [
                    ""
                ],
                "averageRating": "",
                "ratingFrequencies": {
                    "2": "",
                    "3": "",
                    "4": "",
                    "5": "",
                    "6": "",
                    "7": "",
                    "8": "",
                    "9": "",
                    "10": "",
                    "11": "",
                    "12": "",
                    "13": "",
                    "14": "",
                    "15": "",
                    "16": "",
                    "17": "",
                    "18": "",
                    "19": "",
                    "20": ""
                },
                "userCount": 0,
                "favoritesCount": 0,
                "startDate": "0000-00-00",
                "endDate": "0000-00-00",
                "nextRelease": null,
                "popularityRank": 0,
                "ratingRank": 0,
                "ageRating": "",
                "ageRatingGuide": "",
                "subtype": "",
                "status": "",
                "tba": "",
                "posterImage": {
                    "tiny": "",
                    "large": "",
                    "small": "",
                    "medium": "",
                    "original": "",
                    "meta": {
                        "dimensions": {
                            "tiny": {
                                "width": 0,
                                "height": 0
                            },
                            "large": {
                                "width": 0,
                                "height": 0
                            },
                            "small": {
                                "width": 0,
                                "height": 0
                            },
                            "medium": {
                                "width": 0,
                                "height": 0
                            }
                        }
                    }
                },
                "coverImage": {
                    "tiny": "",
                    "large": "",
                    "small": "",
                    "original": "",
                    "meta": {
                        "dimensions": {
                            "tiny": {
                                "width": 0,
                                "height": 0
                            },
                            "large": {
                                "width": 0,
                                "height": 0
                            },
                            "small": {
                                "width": 0,
                                "height": 0
                            }
                        }
                    }
                },
                "episodeCount": 0,
                "episodeLength": 0,
                "totalLength": 0,
                "youtubeVideoId": "",
                "showType": "",
                "nsfw": false
            },
            "relationships": {
                "genres": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "categories": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "castings": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "installments": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "mappings": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "reviews": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "mediaRelationships": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "characters": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "staff": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "productions": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "quotes": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "episodes": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "streamingLinks": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "animeProductions": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "animeCharacters": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                },
                "animeStaff": {
                    "links": {
                        "self": "",
                        "related": ""
                    }
                }
            }
        }
    ],
    "meta": {
        "count": 0
    },
    "links": {
        "first": "",
        "last": ""
    }
}