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

debowerify

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

debowerify - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

17

index.js

@@ -103,2 +103,7 @@ var bower = require('bower');

var preferNPM = (typeof options.preferNPM === 'boolean') ? options.preferNPM :
(typeof options.preferNPM === 'object' && options.preferNPM.length && options.preferNPM.indexOf(moduleName) !== -1);
if(preferNPM && nodeCanResolve(moduleName)) return;
var module = getModule(moduleName);

@@ -145,5 +150,5 @@ if (!module) return;

}
paths.forEach(function (p) {
paths.forEach(function (p, i) {
var st = '\nrequire(' + p + ')'
chunks[node.range[1] + 1] = st
chunks[node.range[1] + (i + 1)] = st
})

@@ -162,4 +167,12 @@ }

function nodeCanResolve(moduleName) {
try {
return !!require.resolve(moduleName);
} catch(e) {
return false;
}
}
return chunks.join('');
}
};

2

package.json
{
"name": "debowerify",
"version": "1.3.1",
"version": "1.4.0",
"description": "A browserify transform to enable the easy use of bower components in browserify client javascript projects. This can be used in conjunction with deamdify to require AMD components from bower as well.",

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

@@ -56,2 +56,8 @@ # debowerify

## Options
### preferNPM
Set `preferNPM` option to `true`, or an array of module names, to have `debowerify` prefer NPM modules over bower components. This is useful for when you have a module that is installed both as a node module and as a bower component.
# How to use with AMD components

@@ -58,0 +64,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