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

ipfs-api

Package Overview
Dependencies
Maintainers
5
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-api - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

dist/ipfsapi.min.js

4

package.json
{
"name": "ipfs-api",
"version": "2.3.0",
"version": "2.3.1",
"description": "A client library for the IPFS API",

@@ -35,3 +35,3 @@ "main": "src/index.js",

"lint": "./node_modules/.bin/standard --format",
"build": "./node_modules/.bin/browserify -t brfs -s ipfsAPI -e ./src/index.js | ./node_modules/.bin/uglifyjs -m > ipfsapi.min.js"
"build": "./node_modules/.bin/browserify -t brfs -s ipfsAPI -e ./src/index.js | tee dist/ipfsapi.js | ./node_modules/.bin/uglifyjs -m > dist/ipfsapi.min.js"
},

@@ -38,0 +38,0 @@ "pre-commit": [

@@ -37,2 +37,14 @@ IPFS API wrapper library for Node.js and the browser

If you omit the host and port, the api will parse window.host, and use this information. I.e, this also works:
```
var ipfs = window.ipfsAPI()
```
This can be useful if you want to write apps that can be run from multiple different gateways.
#### Gotchas
When using the api from script tag for things that require buffers (ipfs.add, for example), you will have to use either the exposed ipfs.Buffer, that works just like a node buffer, or use this [browser buffer](https://github.com/feross/buffer)
## CORS

@@ -39,0 +51,0 @@

@@ -200,2 +200,4 @@ var multiaddr = require('multiaddr')

self.Buffer = Buffer
self.refs = argCommand('refs')

@@ -202,0 +204,0 @@ self.refs.local = command('refs/local')

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