Socket
Socket
Sign inDemoInstall

crop-universal

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crop-universal - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

3

package.json
{
"name": "crop-universal",
"version": "1.0.0",
"version": "1.0.1",
"description": "Crop transparent pixel from image",

@@ -35,2 +35,3 @@ "keywords": [

"homepage": "https://github.com/GMartigny/crop-universal#readme",
"funding": "https://github.com/GMartigny/crop-universal?sponsor=1",
"dependencies": {

@@ -37,0 +38,0 @@ "detect-edges": "^1.0.1"

# crop-universal
[![Package version](https://flat.badgen.net/npm/v/crop-universal)](https://www.npmjs.com/package/crop-universal)
[![Package size](https://badgen.net/bundlephobia/minzip/crop-universal)](https://bundlephobia.com/result?p=crop-universal)
[![Package size](https://flat.badgen.net/bundlephobia/minzip/crop-universal)](https://bundlephobia.com/result?p=crop-universal)
Crop all transparent pixel around an image's edges.
⚠️ This package is environment agnostic. It requires you to provide a `Canvas` implementation. It'll be way more simple for you to use:
- For browsers, use [`crop-browser`](https://github.com/GMartigny/crop-browser)
- For Node.js, use [`crop-node`](https://github.com/GMartigny/crop-node)
- As a CLI, use [`crop-node-cli`](https://github.com/GMartigny/crop-node-cli)
⚠️ This package is environment agnostic. It requires you to provide a `Canvas` implementation. It'll be more simple for you to use:
- For browsers 👉 [`crop-browser`](https://github.com/GMartigny/crop-browser)
- For Node.js 👉 [`crop-node`](https://github.com/GMartigny/crop-node)
- As a CLI 👉 [`crop-node-cli`](https://github.com/GMartigny/crop-node-cli)

@@ -42,2 +42,3 @@

|environment |`Object` |required |Object holding a `createCanvas` and a `loadImage` implementation |
This will return a `Function` that you can use to crop.

@@ -49,4 +50,5 @@

| --- | --- | --- | --- |
|input |`String|any` |required |Path to the image to process or any type supported by your `Canvas.prototype.drawImage` environment |
|input |`String\|any` |required |Path to the image to process or any type supported by your `Canvas.prototype.drawImage` environment |
|options |`Options` |`undefined` |Allow to forward [options to `detect-edges`](https://github.com/GMartigny/detect-edges#options) |
This will return a canvas with the result drawn onto.

@@ -53,0 +55,0 @@

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