You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

ipfs-utils

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.1.0

10

CHANGELOG.md

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

<a name="2.1.0"></a>
# [2.1.0](https://github.com/ipfs/js-ipfs-utils/compare/v2.0.0...v2.1.0) (2020-04-13)
### Features
* add iterator method to response ([#36](https://github.com/ipfs/js-ipfs-utils/issues/36)) ([8f7c96c](https://github.com/ipfs/js-ipfs-utils/commit/8f7c96c))
<a name="2.0.0"></a>

@@ -2,0 +12,0 @@ # [2.0.0](https://github.com/ipfs/js-ipfs-utils/compare/v1.2.4...v2.0.0) (2020-04-09)

3

package.json
{
"name": "ipfs-utils",
"version": "2.0.0",
"version": "2.1.0",
"description": "Package to aggregate shared logic and dependencies for the IPFS ecosystem",

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

"it-drain": "^1.0.0",
"it-last": "^1.0.1",
"it-to-stream": "^0.1.1"

@@ -57,0 +58,0 @@ },

@@ -8,7 +8,8 @@ 'use strict'

const http = new Http()
const response = await http.get(url)
yield {
path: decodeURIComponent(new URL(url).pathname.split('/').pop() || ''),
content: await http.iterator(url, { method: 'get' })
content: response.iterator()
}
}

@@ -139,3 +139,3 @@ /* eslint-disable no-undef */

response.ndjson = async function * () {
response.iterator = function () {
const it = streamToAsyncIterator(response.body)

@@ -147,3 +147,7 @@

for await (const chunk of ndjson(it)) {
return it
}
response.ndjson = async function * () {
for await (const chunk of ndjson(response.iterator())) {
if (options.transform) {

@@ -150,0 +154,0 @@ yield options.transform(chunk)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc