Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@erebos/api-bzz-browser

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@erebos/api-bzz-browser - npm Package Compare versions

Comparing version 0.5.3 to 0.6.0

20

cjs/index.js

@@ -8,2 +8,6 @@ "use strict";

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));

@@ -19,6 +23,10 @@

function Bzz(url) {
function Bzz(config) {
var _this;
_this = _BaseBzz.call(this, url) || this;
var url = config.url,
cfg = (0, _objectWithoutPropertiesLoose2.default)(config, ["url"]);
_this = _BaseBzz.call(this, (0, _extends2.default)({}, cfg, {
url: new URL(url).href
})) || this;
_this._fetch = window.fetch.bind(window);

@@ -30,3 +38,3 @@ return _this;

_proto.uploadDirectory = function uploadDirectory(directory, options, headers) {
_proto.uploadDirectory = function uploadDirectory(directory, options) {
if (options === void 0) {

@@ -36,6 +44,2 @@ options = {};

if (headers === void 0) {
headers = {};
}
var form = new FormData();

@@ -58,3 +62,3 @@ Object.keys(directory).forEach(function (key) {

return this._upload(form, options, headers);
return this._upload(form, options);
};

@@ -61,0 +65,0 @@

19

esm/index.js

@@ -0,1 +1,3 @@

import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";

@@ -11,6 +13,11 @@

function Bzz(url) {
function Bzz(config) {
var _this;
_this = _BaseBzz.call(this, url) || this;
var url = config.url,
cfg = _objectWithoutPropertiesLoose(config, ["url"]);
_this = _BaseBzz.call(this, _extends({}, cfg, {
url: new URL(url).href
})) || this;
_this._fetch = window.fetch.bind(window);

@@ -22,3 +29,3 @@ return _this;

_proto.uploadDirectory = function uploadDirectory(directory, options, headers) {
_proto.uploadDirectory = function uploadDirectory(directory, options) {
if (options === void 0) {

@@ -28,6 +35,2 @@ options = {};

if (headers === void 0) {
headers = {};
}
var form = new FormData();

@@ -50,3 +53,3 @@ Object.keys(directory).forEach(function (key) {

return this._upload(form, options, headers);
return this._upload(form, options);
};

@@ -53,0 +56,0 @@

{
"name": "@erebos/api-bzz-browser",
"version": "0.5.3",
"version": "0.6.0",
"description": "Bzz API for browser",

@@ -27,7 +27,7 @@ "repository": "git@github.com:MainframeHQ/erebos.git",

"@babel/runtime": "^7.0.0",
"@erebos/api-bzz-base": "^0.5.4"
"@erebos/api-bzz-base": "^0.6.0"
},
"devDependencies": {
"flow-bin": "^0.88.0"
"flow-bin": "^0.89.0"
}
}

@@ -8,4 +8,3 @@ import BaseBzz, { DirectoryData, UploadOptions } from '@erebos/api-bzz-base'

options?: UploadOptions,
headers?: Object,
): Promise<hexValue>
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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