@apimatic/file-wrapper
Advanced tools
Comparing version 0.3.0 to 0.3.1
import { __assign } from 'tslib'; | ||
/** | ||
* Wraps file with mime-type and filename to be sent as part of an HTTP request. | ||
*/ | ||
var FileWrapper = | ||
/*#__PURE__*/ | ||
/** @class */ | ||
@@ -16,8 +15,5 @@ function () { | ||
} | ||
return FileWrapper; | ||
}(); | ||
/** Returns true if value is a FileWrapper */ | ||
function isFileWrapper(value) { | ||
@@ -31,24 +27,16 @@ return value instanceof FileWrapper; | ||
*/ | ||
function cloneFileWrapper(fileWrapper) { | ||
var options; | ||
if (fileWrapper.options) { | ||
options = cloneFileWrapperOptions(fileWrapper.options); | ||
} | ||
return new FileWrapper(fileWrapper.file, options); | ||
} | ||
function cloneFileWrapperOptions(fileWrapperOptions) { | ||
var clone = __assign({}, fileWrapperOptions); | ||
if (fileWrapperOptions.headers) { | ||
clone.headers = __assign({}, fileWrapperOptions.headers); | ||
} | ||
return clone; | ||
} | ||
export { FileWrapper, cloneFileWrapper, isFileWrapper }; |
{ | ||
"name": "@apimatic/file-wrapper", | ||
"author": "APIMatic Ltd.", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"license": "MIT", | ||
@@ -43,4 +43,4 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@babel/cli": "^7.10.5", | ||
"@babel/core": "^7.10.5", | ||
"@babel/cli": "^7.21.5", | ||
"@babel/core": "^7.22.1", | ||
"@size-limit/preset-small-lib": "^7.0.8", | ||
@@ -47,0 +47,0 @@ "babel-plugin-annotate-pure-calls": "^0.4.0", |
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
7425