Socket
Socket
Sign inDemoInstall

through2-map

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

through2-map - npm Package Compare versions

Comparing version 1.4.0 to 2.0.0

13

package.json
{
"name": "through2-map",
"version": "1.4.0",
"version": "2.0.0",
"description": "A through2 to create an Array.prototype.map analog for streams.",

@@ -38,11 +38,10 @@ "main": "index.js",

"devDependencies": {
"tape": "~2.13.2",
"stream-spigot": "~3.0.4",
"concat-stream": "~1.4.6"
"tape": "~4.0.0",
"stream-spigot": "~3.0.5",
"terminus": "~1.0.12"
},
"dependencies": {
"terminus": "~1.0.10",
"through2": "~0.5.1",
"xtend": "^3.0.0"
"through2": "~2.0.0",
"xtend": "^4.0.0"
}
}

@@ -31,3 +31,3 @@ through2-map

// Additionally accepts `wantStrings` argument to conver buffers into strings
// Additionally accepts `wantStrings` argument to convert buffers into strings
var stripTags = map({wantStrings: true}, function (str) {

@@ -62,20 +62,30 @@ // OMG don't actually use this

`require("through2-map")([options,] fn)`
---
```
require("through2-map")([options,] fn)
```
Create a `stream.Transform` instance that will call `fn(chunk, index)` on each stream segment.
`var Tx = require("through2-map").ctor([options,] fn)`
---
- - -
```
var Tx = require("through2-map").ctor([options,] fn)
```
Create a reusable `stream.Transform` TYPE that can be called via `new Tx` or `Tx()` to create an instance.
`require("through2-map").obj([options,] fn)`
---
- - -
```
require("through2-map").obj([options,] fn)
```
Create a `through2-map` instance that defaults to `objectMode: true`.
`require("through2-map").objCtor([options,] fn)`
---
- - -
```
require("through2-map").objCtor([options,] fn)
```
Just like ctor, but with `objectMode: true` defaulting to true.

@@ -82,0 +92,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