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

gulp-file-include

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-file-include - npm Package Compare versions

Comparing version 0.13.6 to 0.13.7

0

lib/indent.js

@@ -0,0 +0,0 @@ module.exports = function(src, index, dest) {

6

lib/index.js

@@ -91,3 +91,3 @@ 'use strict';

// jshint ignore: end
return condition ? inst.body : '';

@@ -97,5 +97,5 @@ }

function includeHandler(inst) {
var args = /[^)"\']*["\']([^"\']*)["\'](,\s*({[\s\S]*?})){0,1}\s*/.exec(inst.args);
var args = /[^)"\']*["\']([^"\']*)["\'](,\s*({[\s\S]*})){0,1}\s*/.exec(inst.args);
if(args) {
if (args) {
var includePath = path.resolve(filebase, args[1]);

@@ -102,0 +102,0 @@ // for checking if we are not including the current file again

var balanced = require('balanced-match');
module.exports = function (content, opts) {
module.exports = function(content, opts) {
var result = '';

@@ -14,3 +14,3 @@ var reStart = new RegExp(opts.prefix + '[ ]*' + opts.name + '\\(');

while(matchStart = reStart.exec(content)) {
while (matchStart = reStart.exec(content)) {
safeStart = matchStart.index + matchStart[0].length - 1;

@@ -20,4 +20,4 @@

if(matchArg && matchArg.start === 0) {
if(opts.suffix) {
if (matchArg && matchArg.start === 0) {
if (opts.suffix) {
matchEnd = reEnd.exec(matchArg.post);

@@ -28,3 +28,3 @@ }

if(!opts.suffix || matchEnd) {
if (!opts.suffix || matchEnd) {
before = content.slice(0, matchStart.index);

@@ -36,3 +36,3 @@ replacement = opts.handler({

if(replacement !== undefined) {
if (replacement !== undefined) {
result += before + replacement.toString();

@@ -39,0 +39,0 @@ content = content.slice(safeStart + matchArg.end + 1 + matchEnd);

@@ -30,3 +30,3 @@ var balanced = require('balanced-match');

if(replacement !== undefined) {
if (replacement !== undefined) {
result += before + parse(replacement.toString(), opts);

@@ -33,0 +33,0 @@ content = content.slice(startEnd + matchBody.end + matchEnd);

@@ -0,0 +0,0 @@ var flatten = require('flatnest').flatten;

{
"name": "gulp-file-include",
"version": "0.13.6",
"version": "0.13.7",
"description": "a gulp plugin for file include",

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

@@ -0,0 +0,0 @@ [![NPM version][npm-img]][npm-url]

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