Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

peter-generator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

peter-generator

A simple thumbnail generator for JS.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by20%
Maintainers
1
Weekly downloads
 
Created
Source

Peter is a dead simple thumbnail generator for your node app, using sharp.

Installation

To install the latest version:

yarn add peter-generator

Or if you are using npm:

npm install --save peter-generator

Let’s Get Started!

Adding the library to your project is that easy!

import { ThumbnailGenerator } from 'peter-generator'

const gen = new ThumbnailGenerator()
gen.generate(imgBuffer)
    .then(resBuffer => {
        // Handle result
    })

You can pass options to improve the quality/performance of the generation:

new ThumbnailGenerator({
   sizeLimit: '200kB',
})

You can find more information here.

Keywords

FAQs

Package last updated on 08 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc