🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

wiredep

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wiredep - npm Package Compare versions

Comparing version

to
0.4.0

22

lib/detect-dependencies.js

@@ -205,2 +205,20 @@ /*

/**
* Excludes dependencies that match any of the patterns.
*
* @param {array} allDependencies array of dependencies to filter
* @param {array} patterns array of patterns to match against
* @return {array} items that don't match any of the patterns
*/
var filterExcludedDependencies = function (allDependencies, patterns) {
return _.transform(allDependencies, function (result, dependencies, fileType) {
result[fileType] = _.reject(dependencies, function (dependency) {
return _.find(patterns, function (pattern) {
return dependency.match(pattern);
});
});
});
};
/**
* Detect dependencies of the components from `bower.json`.

@@ -214,9 +232,9 @@ *

config.set('global-dependencies-sorted', {
config.set('global-dependencies-sorted', filterExcludedDependencies({
js: prioritizeDependencies(config, '.js'),
css: prioritizeDependencies(config, '.css'),
scss: prioritizeDependencies(config, '.scss')
});
}, config.get('exclude')));
return config;
};

2

package.json
{
"name": "wiredep",
"version": "0.3.1",
"version": "0.4.0",
"description": "Wire dependencies to your source code.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/stephenplusplus/wiredep",

@@ -5,2 +5,3 @@ # wiredep

## Getting Started

@@ -16,3 +17,4 @@ Install the module with: `npm install wiredep --save`

jsPattern: 'default: <script src="{{filePath}}"></script>',
cssPattern: 'default: <link rel="stylesheet" href="{{filePath}}" />'
cssPattern: 'default: <link rel="stylesheet" href="{{filePath}}" />',
exclude: [ /jquery/, "bower_components/modernizr/modernizr.js" ]
});

@@ -19,0 +21,0 @@ ```

Sorry, the diff of this file is not supported yet