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

gulp-buddy.js

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-buddy.js - npm Package Compare versions

Comparing version 0.1.3 to 1.0.0

34

index.js

@@ -7,2 +7,3 @@ 'use strict';

var hookStdio = require('hook-stdio');
var extend = require('util-extend');
var Detector = require('buddy.js/lib/detector');

@@ -13,8 +14,8 @@ var reporters = require('buddy.js/lib/reporters');

switch(reporter) {
case "simple":
return (output.indexOf("No magic numbers found") > -1);
case "detailed":
return (output.indexOf("No magic numbers found") > -1);
case "json":
return output === "[]";
case 'simple':
return (output.indexOf('No magic numbers found') > -1);
case 'detailed':
return (output.indexOf('No magic numbers found') > -1);
case 'json':
return output === '[]';
default:

@@ -28,8 +29,11 @@ return true;

options = options || {};
options.ignore = options.ignore || [0, 1];
options.disableIgnore = options.disableIgnore || false;
options.reporter = options.reporter || "simple";
options.enforceConst = options.enforceConst || false;
options.noColor = options.noColor || false;
options = extend({
ignore: [0, 1],
disableIgnore: false,
detectObjects: false,
reporter: 'simple',
enforceConst: false,
noColor: false
}, options);
options.ignore = options.disableIgnore ? [] : options.ignore;

@@ -40,4 +44,2 @@ if (options.noColor) {

var ignore = options.disableIgnore ? [] : options.ignore;
return through.obj(function (file, enc, cb) {

@@ -57,6 +59,6 @@ if (file.isNull()) {

var detector = new Detector(paths, options.enforceConst, ignore);
var detector = new Detector(paths, options);
var reporter = new reporters[options.reporter](detector);
var output = "";
var output = '';
var unhook = hookStdio.stdout(function(string) {

@@ -63,0 +65,0 @@ output += string;

{
"name": "gulp-buddy.js",
"version": "0.1.3",
"version": "1.0.0",
"description": "Gulp plugin for running buddy.js",

@@ -38,4 +38,5 @@ "license": "MIT",

"hook-stdio": "^1.0.0",
"through2": "^0.6.1"
"through2": "^0.6.1",
"util-extend": "^1.0.1"
}
}
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