Socket
Socket
Sign inDemoInstall

remove.bg

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

remove.bg - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

10

dist/index.d.ts
interface RemoveBgOptions {
apiKey: string;
/**
* Default "regular", which costs 1 credit. "hd" costs 5. "4k" costs 8.
* Output resolution.
* "regular" default (up to 0.25 megapixels), which costs 1 credit.
* "medium" (up to 1.5 megapixels) costs 3.
* "hd" (up to 4 megapixels) costs 5.
* "4k" (up to 10 megapixels) costs 8.
*/
size?: "regular" | "hd" | "4k";
size?: "regular" | "medium" | "hd" | "4k";
outputFile?: string;

@@ -21,2 +25,4 @@ }

creditsCharged: number;
resultWidth: number;
resultHeight: number;
}

@@ -23,0 +29,0 @@ export interface RemoveBgError {

4

dist/index.js

@@ -64,3 +64,5 @@ "use strict";

base64img: result.body.data.result_b64,
creditsCharged: result.headers["x-credits-charged"]
creditsCharged: result.headers["x-credits-charged"],
resultWidth: result.headers["x-width"],
resultHeight: result.headers["x-height"]
});

@@ -67,0 +69,0 @@ }

interface RemoveBgOptions {
apiKey: string;
/**
* Default "regular", which costs 1 credit. "hd" costs 5. "4k" costs 8.
* Output resolution.
* "regular" default (up to 0.25 megapixels), which costs 1 credit.
* "medium" (up to 1.5 megapixels) costs 3.
* "hd" (up to 4 megapixels) costs 5.
* "4k" (up to 10 megapixels) costs 8.
*/
size?: "regular" | "hd" | "4k";
size?: "regular" | "medium" | "hd" | "4k";
outputFile?: string;

@@ -21,2 +25,4 @@ }

creditsCharged: number;
resultWidth: number;
resultHeight: number;
}

@@ -23,0 +29,0 @@ export interface RemoveBgError {

@@ -64,3 +64,5 @@ "use strict";

base64img: result.body.data.result_b64,
creditsCharged: result.headers["x-credits-charged"]
creditsCharged: result.headers["x-credits-charged"],
resultWidth: result.headers["x-width"],
resultHeight: result.headers["x-height"]
});

@@ -67,0 +69,0 @@ }

{
"name": "remove.bg",
"version": "1.0.2",
"version": "1.0.3",
"description": "A simple wrapper for the remove.bg API",

@@ -32,3 +32,3 @@ "main": "dist/index.js",

"request": "^2.88.0",
"unirest": "~0.5.1"
"unirest": "~0.6.0"
},

@@ -35,0 +35,0 @@ "devDependencies": {

@@ -38,4 +38,4 @@ # [remove.bg](https://www.remove.bg) API wrapper for Node.js

| apiKey | Y | `string` | The API key you got from the [remove.bg website](https://www.remove.bg/api). |
| size | N | `"regular"` / `"hd"` / `"4k"` | The returned size of the image. The cheaper `"regular"` option is default. |
| outputFile | N | `string` | The path to save the file returned by the API. |
| size | N | `"regular"` / `"medium"` / `"hd"` / `"4k"` | The returned size of the image. The cheaper `"regular"` option is default. |
| outputFile | N | `string` | The path to save the returned file to. |

@@ -48,2 +48,4 @@ And the **output properties** are:

| creditsCharged | `number` | Amount of credits charged for this call, based on the output size of the response.
| resultWidth | `number` | The width of the result image, in pixels.
| resultHeight | `number` | The height of the result image, in pixels.

@@ -116,2 +118,2 @@ ### `removeBackgroundFromImageFile`

});
```
```
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