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

treegulp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

treegulp - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.npmignore~

2

package.json
{
"name": "treegulp",
"version": "0.1.0",
"version": "0.1.1",
"description": "treegulp provides a shorthand for organizing your gulp tasks into a dependency tree.",

@@ -5,0 +5,0 @@ "main": "treegulp.js",

@@ -5,3 +5,5 @@ var gulp = require('gulp');

var treegulp = function() {
var i, result = {};
var i,
args = Array.prototype.slice.call(arguments), // Make a real Array.
result = {};
result.names = [];

@@ -11,27 +13,22 @@ result.dependencies = [];

for (i = 0; i < arguments.length; ++i) {
var argument = arguments[i];
var argument = arguments[i];
// Have to loop primitively because 'args' may grow in the loop.
for (i = 0; i < args.length; ++i) {
var argument = args[i];
// If the argument is a string, treat it as a name.
if (typeof argument === 'string') {
result.names.push(argument);
}
else if (typeof argument === 'object') {
// Gather the argument into a list, whatever it is.
var dependencyList;
if (Array.isArray(argument)) {
dependencyList = argument;
}
else {
dependencyList = [argument];
}
// Add each dependency's first name to the dependencies.
for (j = 0; j < dependencyList.length; ++j) {
result.dependencies.push(dependencyList[j].names[0]);
}
}
// If it's a function, use it as a callback method.
else if (typeof argument === 'function') {
result.methods.push(argument);
}
// If it's an array, add each element into args to process later.
else if (Array.isArray(argument)) {
args = args.concat(argument);
}
// Objects are assumed to be of the form returned by this function.
else if (typeof argument === 'object') {
result.dependencies.push(argument);
}
}

@@ -38,0 +35,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