Comparing version 1.0.1 to 1.0.2
interface RemoveBgOptions { | ||
apiKey: string; | ||
/** | ||
* Default "regular", which costs 1 credit. "hd" costs 5. | ||
* Default "regular", which costs 1 credit. "hd" costs 5. "4k" costs 8. | ||
*/ | ||
size?: "regular" | "hd"; | ||
size?: "regular" | "hd" | "4k"; | ||
outputFile?: string; | ||
@@ -20,2 +20,3 @@ } | ||
base64img: string; | ||
creditsCharged: number; | ||
} | ||
@@ -22,0 +23,0 @@ export interface RemoveBgError { |
@@ -63,3 +63,4 @@ "use strict"; | ||
resolve({ | ||
base64img: result.body.data.result_b64 | ||
base64img: result.body.data.result_b64, | ||
creditsCharged: result.headers["x-credits-charged"] | ||
}); | ||
@@ -66,0 +67,0 @@ } |
{ | ||
"name": "remove.bg", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A simple wrapper for the remove.bg API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -38,3 +38,3 @@ # [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"` | The returned size of the image. The cheaper `"regular"` option is default. | | ||
| 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. | | ||
@@ -47,2 +47,3 @@ | ||
| base64img | `string` | Base64 encoded representation of the returned image. | ||
| creditsCharged | `number` | Amount of credits charged for this call, based on the output size of the response. | ||
@@ -49,0 +50,0 @@ ### `removeBackgroundFromImageFile` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
258906
7
200
114
2