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

gulp-append-prepend

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-append-prepend - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

spec/fixture/index.html

20

index.js

@@ -13,3 +13,3 @@ const through = require('through2');

const filesContents = [];
for(i = 0; i < filepaths.length; i++){
for (let i = 0; i < filepaths.length; i++) {
filesContents.push(read.sync(filepaths[i], 'utf8'));

@@ -29,3 +29,3 @@ }

if (type != "append" && type != "prepend") {
if (type !== "append" && type !== "prepend") {
throw new PluginError(PLUGIN_NAME, 'Missing type !');

@@ -39,7 +39,7 @@ }

const buffers = [];
for (i = 0; i < texts.length; i++) {
if (type == "prepend") {
buffers.push(new Buffer(texts[i].trim() + separator));
}else if(type == "append") {
buffers.push(new Buffer(separator + texts[i].trim()));
for (let i = 0; i < texts.length; i++) {
if (type === "prepend") {
buffers.push(Buffer.from(texts[i].trim() + separator));
} else if (type === "append") {
buffers.push(Buffer.from(separator + texts[i].trim()));
}

@@ -56,9 +56,9 @@ }

const concat = [];
if (type == "append") {
if (type === "append") {
concat.push(file.contents);
}
for(i = 0; i < buffers.length; i++){
for (let i = 0; i < buffers.length; i++) {
concat.push(buffers[i]);
}
if (type == "prepend") {
if (type === "prepend") {
concat.push(file.contents);

@@ -65,0 +65,0 @@ }

{
"name": "gulp-append-prepend",
"version": "1.0.6",
"version": "1.0.7",
"description": "Simple Gulp plugin to append/prepend.",

@@ -31,4 +31,17 @@ "main": "index.js",

],
"jshintConfig": {
"esversion": 9,
"strict": "implied",
"eqeqeq": true,
"undef": true,
"unused": true,
"mocha": true,
"node": true
},
"scripts": {
"pretest": "jshint *.js spec",
"test": "mocha spec/*.js"
},
"engines": {
"node": ">= 0.10.0"
"node": ">=8.15.0"
},

@@ -39,3 +52,8 @@ "dependencies": {

"plugin-error": "^1.0.1"
},
"devDependencies": {
"jshint": "^2.10.2",
"mocha": "^6.0.2",
"vinyl": "~2.2.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