Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoSign in
Socket

gulp-wrap-function

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-wrap-function

gulp plugin for wrapping your customize function

latest
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

#gulp-wrap-function

Gulp plugin for wrapping your customize function and process your file content directly.

##Installation

% npm install gulp-wrap-function

##Usage

Example 1: replace all newlines.

var wrap = require("gulp-wrap-function");

gulp.src("file.html")
  .pipe(wrap(function(file) {
    return file.replace('\n', '');
  }))
  .pipe(gulp.dest("dist"));

Example 2: split and remain second one.

var wrap = require("gulp-wrap-function");

gulp.src("file.html")
  .pipe(wrap(function(file) {
    return file.split('\n')[1];
  }))
  .pipe(gulp.dest("dist"));

##License

MIT

FAQs

Package last updated on 28 Jan 2015

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