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

@shineiichijo/canvas-chan

v1.0.1

Published

Making canvas stuffs easier

Downloads

554

Readme

Canvas-chan

NPM

Making canvas stuffs easier


Installation

yarn add @shineiichijo/canvas-chan

Features

  • Simple to use
  • Can be used for shipping people ❤️
  • Can be used to make a person simp (ahm..)
  • Generates image of Guess-The-Pokemon game (hidden and shown)
  • And more...

Usage

Ship

import { Ship, IShipOptions } from '@shineiichijo/canvas-chan'
import { writeFile } from 'fs-extra'

(async () => {
    const options: IShipOptions = [
        {
            //name of the person1
            name: 'Person1',
            //image of the person1 (can be a Buffer)
            image: 'https://i.pinimg.com/originals/35/66/03/3566030107abb8193bfe646ee53ba3a0.jpg'
        },
        {
            //name of the person2
            name: 'Person2',
            //image of the person2 (can be a Buffer)
            image: 'https://i.pinimg.com/originals/5a/d2/0b/5ad20b2696a632543659055d62928028.jpg'
        }
    ]
    const level = Math.floor(Math.random() * 100)
    const ship = await new Ship(options, level, 'Amazing').build()
    //now let's write the image (Buffer)
    await writeFile('ship.png', ship)
})()

Result

Simp

import { Simp } from '@shineiichijo/canvas-chan'
import { writeFile } from 'fs-extra'

(async () => {
    const simp = await new Simp('https://static.fandomspot.com/images/12/11202/05-makoto-itou-school-days-anime-screenshot.jpg').build() //the image can also be a Buffer
    //now let's write the image (Buffer)
    await writeFile('simp.png', simp)
})()

Result

Guess-The-Pokemon

import { Pokemon } from '@shineiichijo/canvas-chan'
import { writeFile } from 'fs-extra'

Hidden

(async () => {
    const image = await new Pokemon(/**Name or Pokedex ID of the Pokemon*/'Chikorita', /**gonna hide it?*/ true).build()
    //now let's write the image (Buffer)
    await writeFile('hiddenPokemon.png', image)
})()

Result

Shown

(async () => {
    const image = await new Pokemon(/**Name or Pokedex ID of the Pokemon*/'Chikorita', /**gonna hide it?*/ false).build()
    //now let's write the image (Buffer)
    await writeFile('shownPokemon.png', image)
})()

Result

Triggered

import { Triggered } from '@shineiichijo/canvas-chan' //const { Triggered } = require('@shineiichijo/canvas-chan')
import { writeFile } from 'fs-extra'

(async () => {
    const triggered = await new Triggered('https://i.pinimg.com/originals/5a/d2/0b/5ad20b2696a632543659055d62928028.jpg').build()
    //now let's write the gif (Buffer)
    await writeFile('triggered.gif', triggered)
})()

Result

Crush

import { Crush } from '@shineiichijo/canvas-chan' //const { Crush } = require(''@shineiichijo/canvas-chan')
import { writeFile } from 'fs-extra'

(async () => {
    const image = await new Crush('https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/bf447e2d-c744-4fb1-b4da-2630503601d2/d6kk0aq-b2032456-df83-4660-b4a4-7b7be582f5e9.png/v1/fill/w_1089,h_734,strp/tokisaki_kurumi_by_neostratos_d6kk0aq-pre.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9MTM1MzciLCJwYXRoIjoiXC9mXC9iZjQ0N2UyZC1jNzQ0LTRmYjEtYjRkYS0yNjMwNTAzNjAxZDJcL2Q2a2swYXEtYjIwMzI0NTYtZGY4My00NjYwLWI0YTQtN2I3YmU1ODJmNWU5LnBuZyIsIndpZHRoIjoiPD0yMDA3MCJ9XV0sImF1ZCI6WyJ1cm46c2VydmljZTppbWFnZS5vcGVyYXRpb25zIl19.glklG5KmumFpSZbhBhu1Ow0b24ERYV3h99HMk4H_eXI')
    await writeFile('crush.png', image)
})()

Result

Friendship

import { Friendship, IFriendShip } from '@shineiichijo/canvas-chan' //const { Friendship } = require('@shineiichijo/canvas-chan')
import { writeFile } from 'fs-extra'

(async () => {
    const options: IFriendShip = [
        {
            //name of the person1
            name: 'Person1',
            //image of the person1 (can be a Buffer)
            image: 'https://i.pinimg.com/originals/5a/d2/0b/5ad20b2696a632543659055d62928028.jpg'
        },
        {
            //name of the person2
            name: 'Person2',
            //image of the person2 (can be a Buffer)
            image: 'https://i.pinimg.com/originals/ea/b2/a4/eab2a46c041c81c781fff1ef0e355811.jpg'
        }
    ]
    const level = Math.floor(Math.random() * 100)
    const image = await new Frienship(options, level, 'Best Friends')
    //now let's write the image (Buffer)
    await writeFile('frienship.png', image)
})()

Result