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

dasp-utils

v0.0.4

Published

A simple gifs package.

Downloads

11

Readme

dasp-utils

dasp-utils is an npm package that provides URLs of gifs for various interactions such as hugs, kicks, kisses, slaps, pokes, pats, cuddles, tickles, smugs, bites, feeds, and high-fives. Each gif comes with additional information about its name and the anime it comes from, making it ideal for use in Discord bots.

Installation

You can install dasp-utils using npm:

npm install dasp-utils

Usage

dasp-utils can be easily used in Discord bots. Below is an example of how to implement dasp-utils in a Discord bot using the discord.js library:

// Command example using dasp-utils:

const gif = require("dasp-utils");

const patGif = gif.pat();

const embed = new EmbedBuilder()
  .setImage(patGif.url) // Returns the gif URL
  .setFooter({ text: patGif.anime }); // Returns the name of the anime of the gif

await interaction.reply({ embeds: [embed] });

Methods

dasp-utils provides the following methods, each of which returns an object with information about the randomly selected gif:

  • hug(): Returns an object with a random hug gif.
  • poke(): Returns an object with a random poke gif.
  • kiss(): Returns an object with a random kiss gif.
  • slap(): Returns an object with a random slap gif.
  • pat(): Returns an object with a random pat gif.
  • cuddle(): Returns an object with a random cuddle gif.
  • tickle(): Returns an object with a random tickle gif.
  • smug(): Returns an object with a random smug gif.
  • bite(): Returns an object with a random bite gif.
  • feed(): Returns an object with a random feed gif.
  • highfive(): Returns an object with a random high-five gif.

Example of Returned Object

Each method returns an object with the following structure:

{
  "name": "Hug18",
  "anime": "Ano Hi Mita Hana no Namae o Bokutachi wa Mada Shiranai",
  "url": "https://i.imgur.com/iKPs2AJ.gif"
}

Total Gifs Information

To get the total number of gifs in each category and overall, use the allGifs method:

const allGifs = gif.allGifs();
console.log(allGifs);

The allGifs method returns an object with the total count of gifs in each category and the overall total:

{
  "totalHugGifs": 21,
  "totalKissGifs": 21,
  "totalSlapGifs": 21,
  "totalPokeGifs": 21,
  "totalPatGifs": 21,
  "totalCuddleGifs": 21,
  "totalTicklesGifs": 21,
  "totalSmugsGifs": 21,
  "totalBiteGifs": 21,
  "totalFeedGifs": 21,
  "totalHighFiveGifs": 21,
  "totalGifs": 230
}

Contributing

If you wish to contribute to this project, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Make your changes and commit them (git commit -am 'Add new feature').
  4. Push your branch to the original repository (git push origin feature/new-feature).
  5. Create a new Pull Request.

License

Anyone can use this project, but please give credit, since all the gifs and names were placed manually. There are currently 231 gifs in total.