I created my first open source npm package: @devadri/create-sticker
A few days ago I created my first open source npm package. I was building a simple concept app that erases the background of images using AI (just keeping the main object/person) and thought it would be nice to make them have a sticker border effect. I found out that there were no libraries yet that solves this task. However, I found a Stack Overflow answer that had the code I needed. The code just worked the way I wanted but it was not easy to use it like ‘plug-and-play’. So I reorganized it, adapted it to TypeScript and publish it as a npm package to make it super simple to be used by anyone. Now you only have to install the package (npm install @devadri/create-sticker
) and call the function: createSticker(img.src, { strokeWidth, strokeColor, padding, fillHoles })
.
- npm package: npmjs.com/package/@devadri/create-sticker
- Source code: github.com/adrian-bueno/create-sticker
The package contains a simple demo web to try it out. You can change the output settings modifying the demo/index.html
file. Here are some screenshots taken from it:
The package has the Unlicense License
, so you could do whatever you want with its code 😎.
Thank you for reading and hope you find it useful.