Comparing version 1.0.2 to 1.0.3
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 @@ } |
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` | ||
}); | ||
``` | ||
``` |
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
259714
216
117
+ Addedasync@0.9.2(transitive)
+ Addedmime@2.6.0(transitive)
+ Addedunirest@0.6.0(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedassert-plus@0.2.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedbl@1.1.2(transitive)
- Removedboom@2.10.1(transitive)
- Removedcaseless@0.11.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedform-data@1.0.1(transitive)
- Removedgenerate-function@2.3.1(transitive)
- Removedgenerate-object-property@1.2.0(transitive)
- Removedhar-validator@2.0.6(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-my-ip-valid@1.0.1(transitive)
- Removedis-my-json-valid@2.20.6(transitive)
- Removedis-property@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjsonpointer@5.0.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedmime@1.3.6(transitive)
- Removednode-uuid@1.4.8(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedqs@6.2.4(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedrequest@2.74.0(transitive)
- Removedsntp@1.0.9(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtough-cookie@2.3.4(transitive)
- Removedtunnel-agent@0.4.3(transitive)
- Removedunirest@0.5.1(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
Updatedunirest@~0.6.0