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

amongus-dumpy

v2.0.0

Published

Among Us Dumpy Node API

Downloads

3

Readme

amongus-dumpy

amongus-dumpy is a Node.js API wrapper to the Among Us Dumpy GIF Maker.

Requirements

You need Java 11 or above and Imagemagick installed (in the path) to use this library. You don't need to add it to the path if you provide the path to the java binary to the Dumpify() constructor; but by default, it points to the java binary in the path.

API

Dumpify(path?: string) constructor

The Dumpify() constuctor is the class constructor that contains the dumpify function that lets you dumpify an image. The constructor takes an optional string argument of the path to the java binary. This argument is not required since it defaults to just java which is the java binary in the path.

Example

const dumpy = new Dumpify("/path/to/java")

dumpify(opts: amongusopts): Buffer function

The dumpify() function is a function that does the dumpifying. This function is an async/promise function so use then() if you want to execute it or await if you are in an async function. The arguments it takes is an amongusopts Object which is what options you want to give to the function. The function returns a GIF in Buffer format so you can like write the image and stuff.

amongusopts object

The properties with the ? at the end of it are properties that arent required. This object is converted into CLI options.

The background property lets you choose a custom background for the GIF. You provide a Buffer to this property.

The file property is required and its what file you want to dumpify. You provide a Buffer to this property.

The lines property is the amount of among us dumpy lines you want in your gif. The more lines there is, the more high quality the image looks but at the cost of more memory usage. This property takes a number.

The mode property lets you choose if you want to use default among us crewmates or furry ones. This property takes a string.

The tmpdir string lets you choose where the CLI stores it's temp files. This also affects the temp files the lib creates for storing the Buffer you provided so it can give it to the CLI.

export interface amongusopts {
    background?: Buffer,
    file: Buffer,
    lines?: number,
    mode?: 'default' | 'furry',
    tmpdir?: string
}

Example

const dumpy = new Dumpify()
const buffer = fs.readFileSync('./image.png')
const buffer2 = dumpy.dumpify({
    file: buffer,
    lines: 10
})

Executable Example

You need an image to test with for this example. You can put a string in the Dumpy() constructor if you don't have java installed in the path.

const {default: Dumpify} = require('amongus-dumpy')
const fs = require('fs')
const path = require('path')
const dumpy = new Dumpify()
const buffer = fs.readFileSync('./image.png')
dumpy.dumpify({
    file: buffer
}).then((buffer2) => {
    fs.writeFileSync(path.join(__dirname, 'amongus.gif'), buffer2)
})