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

acquire

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acquire - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

9

index.js

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

opts.depth = opts.depth || 1;
opts.ignore = typeof opts.ignore == 'string' ? [opts.ignore] : opts.ignore || [];

@@ -62,9 +63,9 @@ var dirs = nodeModulesPaths(opts.basedir)

return zipmap(fs.readdirSync(dir).map(function (basename) {
if (!validateModuleName(basename)) {
var modulePath = path.resolve(dir, basename);
var moduleName = getModuleName(modulePath);
if (!validateModuleName(moduleName) || opts.ignore.indexOf(moduleName) >= 0) {
return;
}
var modulePath = path.resolve(dir, basename);
var moduleName = getModuleName(modulePath);
var resolve = opts.skipFailures

@@ -71,0 +72,0 @@ ? safeResolve.bind(null,

{
"name": "acquire",
"version": "0.3.0",
"version": "0.4.0",
"description": "Require all modules from the node_modules directory, using Node module resolution algorithm to discover it",

@@ -5,0 +5,0 @@ "author": "Eugene Sharygin <eush77@gmail.com>",

@@ -33,2 +33,3 @@ [![npm](https://nodei.co/npm/acquire.png)](https://nodei.co/npm/acquire/)

| depth | number | No | `1` |
| ignore | string/[string] | No | `[]` |
| skipFailures | boolean/function | No | `false` |

@@ -38,2 +39,4 @@

`opts.ignore` specifies module names to ignore.
If `opts.skipFailures` is `true`, modules that fail to `require()` (e.g. plugins for Grunt) are skipped. If `opts.skipFailures` is a function, it is called as `opts.skipFailures(moduleName, modulePath)` for each failure.

@@ -40,0 +43,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