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

picmerge

v1.0.0

Published

Simple picture merge script

Readme

PicMerge

A simple tool that merges two images and return a url where the final image has been uploaded to.

Usage

Using PicMerge is pretty simple.

Fair warning PicMerge is written entirely in ES6. So please make sure you're transpiling your Javascript code somewhere in your build process.

1. Install PicMerge

Run npm install picmerge --save, or if you're cool, use yarn. yarn add picmerge

2. Import picMerge into your nodeJS app


const picMerge = require('picmerge');

If the name doesn't suit your context, you may do something like...


const kudiReferralImg = require('picmerge');

3. Use PicMerge

This is the fun part.

picMerge(firstImageURL, secondImageURL)
.then(url => {
	//do anything with the url here
	console.log(url);
})

If no exceptions are thrown, the url variable would hold a string representation of the URL for the merged picture.

4. Playing Safe

Because shit happens, you may want to do this:

picMerge(firstImageURL, secondImageURL)
.then(url => {
	//do anything with the url here
	console.log(url);
})
.catch(err => {
	//handle err
})

This would save you from events in which an error occurs while picMerge does it's magic.

Later, you may be able to pass in a default url to the picMerge function. So, in the event that an error occurs, picMerge would return the url for some default Image you have specified.

Something like:

	const mergedPicsURL = picMerge(firstImageURL, secondImageURL, defaultImageURL)

5. Example

Here are two urls.

	const bgImg = 'http://i.imgur.com/7mb8Bcl.png';
	const profilePic = 'http://i.imgur.com/sMayycp.png';

Below is the Background Image:

BG image

And the Profile Picture:

Profile Pics

Update your code:

	const bgImg = 'http://i.imgur.com/7mb8Bcl.png';
	const profilePic = 'http://i.imgur.com/sMayycp.png';

	const picMerge = require('./picMerge');
	picMerge(bgImg, profilePic)
	.then(url => {
		console.log(url)
	})

when the picMerge promise is fufilled, res is http://res.cloudinary.com/blushcow/image/upload/v1490510074/vyh2qan9awf6whoidasp.jpg

Final Image

6. What else?

Well, nothing else for now.