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

load-from-directory

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

load-from-directory - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

16

index.js

@@ -23,8 +23,8 @@ /**

/**
* Loads all modules from directory, returns array
* Loads all modules from directory, returns object
* @param root_directory Relative path to root_directory where modules should be loaded from
* @param options object containing options
* @param options.exclude (Default=["index.js", /\..* /]) File names to exclude from import
* @param options.caller_directory (Default=callsite()[ 1 ].getFileName) The directory to use as the root directory for the import (The __dirname of the person calling this method)
* @returns {Array}
* @param options object [{}] - Optional argument containing options
* @param options.exclude [["index.js", /\..* /]] File names to exclude from import
* @param options.caller_directory [callsite()[ 1 ].getFileName] The directory to use as the root directory for the import (The __dirname of the person calling this method)
* @returns {*} Object containing modules key: module name, value: module
*/

@@ -68,2 +68,8 @@ exports.load = function( root_directory, options ) {

/**
* Loads all modules from directory, returns array
* @param root_directory Relative path to root_directory where modules should be loaded from
* @param options [{}] See .load() for more information
* @returns {Array} Array containing modules
*/
exports.loadArray = function( root_directory, options ) {

@@ -70,0 +76,0 @@ options = options || {};

{
"name": "load-from-directory",
"version": "1.0.1",
"version": "1.0.2",
"description": "Loads all modules from the given directory into an array",

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

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