New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browser-ipfs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-ipfs - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

dist/ipfs.min.js

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

(function(){var t={};t.localProvider={host:"localhost",port:"5001",protocol:"http"};t.setProvider=function(o){if(!o)o=this.localProvider;if(typeof o==="object"&&!o.hasOwnProperty("host")){return}t.api=o};t.api_url=function(o){var r=t.api;return r.protocol+"://"+r.host+(r.port?":"+r.port:"")+(r.root?r.root:"")+"/api/v0"+o};function o(o){if(!t.api){o("No provider set",null);return false}return true}function r(r){if(!o(r.callback))return;var e=new XMLHttpRequest;e.addEventListener("load",function(){if(e.status!=200)r.callback(e.responseText,null);else{var t=e.responseText;if(r.transform){t=r.transform(t)}r.callback(null,t)}});e.open(r.method||"GET",t.api_url(r.uri));if(r.accept){e.setRequestHeader("accept",r.accept)}if(r.payload){e.enctype="multipart/form-data";e.send(r.payload)}else{e.send()}}t.add=function(t,o){var n=new FormData;var a=e(t)?t.toString("binary"):t;n.append("file",new Blob([a],{}));r({callback:o,method:"POST",uri:"/add",payload:n,accept:"application/json",transform:function(t){return t?JSON.parse(t)["Hash"]:null}})};t.catText=function(t,o){r({callback:o,uri:"/cat/"+t})};t.cat=t.catText;t.addJson=function(o,r){var e=JSON.stringify(o);t.add(e,r)};t.catJson=function(o,r){t.catText(o,function(t,o){if(t)r(t,{});var e={};try{e=typeof o==="string"?JSON.parse(o):o}catch(n){t=n}r(t,e)})};function e(t){return!!(t!=null&&(t._isBuffer||t.constructor&&typeof t.constructor.isBuffer==="function"&&t.constructor.isBuffer(t)))}if(window!=="undefined"){window.ipfs=t}if(typeof module!=="undefined"&&module.exports){module.exports=t}})();
(function(){var t={};t.localProvider={host:"localhost",port:"5001",protocol:"http"};t.setProvider=function(o){if(!o)o=this.localProvider;if(typeof o==="object"&&!o.hasOwnProperty("host")){return}t.api=o};t.api_url=function(o){var r=t.api;return r.protocol+"://"+r.host+(r.port?":"+r.port:"")+(r.root?r.root:"")+"/api/v0"+o};function o(o){if(!t.api){o("No provider set",null);return false}return true}function r(r){if(!o(r.callback))return;var e=new XMLHttpRequest;e.addEventListener("load",function(){if(e.status!=200)r.callback(e.responseText,null);else{var t=e.responseText;if(r.transform){t=r.transform(t)}r.callback(null,t)}});e.open(r.method||"GET",t.api_url(r.uri));if(r.accept){e.setRequestHeader("accept",r.accept)}if(r.payload){e.enctype="multipart/form-data";e.send(r.payload)}else{e.send()}}t.add=function(t,o){var n=new FormData;var a=e(t)?t.toString("binary"):t;n.append("file",new Blob([a],{}));r({callback:o,method:"POST",uri:"/add",payload:n,accept:"application/json",transform:function(t){return t?JSON.parse(t)["Hash"]:null}})};t.catText=function(t,o){r({callback:o,uri:"/cat/"+t})};t.cat=t.catText;t.addJson=function(o,r){var e=JSON.stringify(o);t.add(e,r)};t.catJson=function(o,r){t.catText(o,function(t,o){if(t)r(t,{});var e={};try{e=typeof o==="string"?JSON.parse(o):o}catch(n){t=n}r(t,e)})};function e(t){return!!(t!=null&&(t._isBuffer||t.constructor&&typeof t.constructor.isBuffer==="function"&&t.constructor.isBuffer(t)))}if(typeof window!=="undefined"){window.ipfs=t}if(typeof module!=="undefined"&&module.exports){module.exports=t}})();

@@ -101,3 +101,3 @@ (function() {

if (window !== 'undefined') {
if (typeof window !== 'undefined') {
window.ipfs = ipfs;

@@ -104,0 +104,0 @@ }

{
"name": "browser-ipfs",
"version": "0.0.4",
"version": "0.0.5",
"description": "Simplified IPFS api targeted at the browser",

@@ -5,0 +5,0 @@ "main": "ipfs.js",

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