Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.3.1 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

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