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

gulp-foreach

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-foreach

Send each file in a stream down its own stream

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.9K
decreased by-3.76%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-foreach

Send each file in a stream down its own stream

Install

$ npm install --save-dev gulp-foreach

Usage

var gulp = require('gulp');
var foreach = require('gulp-foreach');

gulp.task('default', function () {
  return gulp.src('src/*.js')
    .pipe(foreach(function(stream, file){
      return stream
        .pipe(doSomethingWithEachFileIndividually())
        .pipe(concat(file.name));
    }))
    .pipe(gulp.dest('dist'));
});

API

The foreach method takes one argument, a function. This function is called once for each file piped to foreach and is passed a stream as its first argument and the file as its second argument. The stream contains only one file.

You can optionally return a stream from the foreach function. All the streams returned from foreach will be combined and their contents will be emited by foreach.

License

MIT © Marius Gundersen

Keywords

FAQs

Package last updated on 12 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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