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

npm-registry-fetch

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-registry-fetch - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="3.8.0"></a>
# [3.8.0](https://github.com/npm/registry-fetch/compare/v3.7.0...v3.8.0) (2018-08-23)
### Features
* **mapJson:** add support for passing in json stream mapper ([0600986](https://github.com/npm/registry-fetch/commit/0600986))
<a name="3.7.0"></a>

@@ -7,0 +17,0 @@ # [3.7.0](https://github.com/npm/registry-fetch/compare/v3.6.0...v3.7.0) (2018-08-23)

3

config.js

@@ -46,2 +46,5 @@ 'use strict'

},
'map-json': 'mapJson',
'mapJSON': 'mapJson',
'mapJson': {},
'max-sockets': 'maxsockets',

@@ -48,0 +51,0 @@ 'maxsockets': {

3

index.js

@@ -117,3 +117,4 @@ 'use strict'

function fetchJSONStream (uri, jsonPath, opts) {
const parser = JSONStream.parse(jsonPath)
opts = config(opts)
const parser = JSONStream.parse(jsonPath, opts.mapJson)
const pt = parser.pipe(new PassThrough({objectMode: true}))

@@ -120,0 +121,0 @@ parser.on('error', err => pt.emit('error', err))

{
"name": "npm-registry-fetch",
"version": "3.7.0",
"version": "3.8.0",
"description": "Fetch-based http client for use with npm registry APIs",

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

@@ -339,2 +339,12 @@ # npm-registry-fetch [![npm version](https://img.shields.io/npm/v/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![license](https://img.shields.io/npm/l/npm-registry-fetch.svg)](https://npm.im/npm-registry-fetch) [![Travis](https://img.shields.io/travis/npm/npm-registry-fetch/latest.svg)](https://travis-ci.org/npm/npm-registry-fetch) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/npm-registry-fetch/latest.svg)](https://ci.appveyor.com/project/npm/npm-registry-fetch) [![Coverage Status](https://coveralls.io/repos/github/npm/npm-registry-fetch/badge.svg?branch=latest)](https://coveralls.io/github/npm/npm-registry-fetch?branch=latest)

##### <a name="opts-map-json"></a> `opts.map-json`
* Alias: `mapJson`, `mapJSON`
* Type: Function
* Default: undefined
When using `fetch.json.stream()` (NOT `fetch.json()`), this will be passed down
to [`JSONStream`](https://npm.im/JSONStream) as the second argument to
`JSONStream.parse`, and can be used to transform stream data before output.
##### <a name="opts-maxsockets"></a> `opts.maxsockets`

@@ -341,0 +351,0 @@

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