Gathering detailed insights and metrics for node-glob-loader
Gathering detailed insights and metrics for node-glob-loader
Gathering detailed insights and metrics for node-glob-loader
Gathering detailed insights and metrics for node-glob-loader
node-import-glob-loader
webpack loader to load files at once with glob from node_modules folder
globload
A Node.js module loader for importing files using glob patterns, supporting specific exports and YAML parsing.
@npmteam2024/nesciunt-tempore-occaecati
A simple cache system for a single user request, built on the same concepts of [data loader](https://github.com/facebook/dataloader).
node-glob-import
Allows you to load several files with a single import statement using a glob pattern.
Loader: a very simple loader to require() based on glob pattern matching.
npm install node-glob-loader
Typescript
Module System
Min. Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
5 Stars
80 Commits
3 Forks
1 Watchers
2 Branches
3 Contributors
Updated on Jul 20, 2018
Latest Version
0.0.15
Package Id
node-glob-loader@0.0.15
Size
4.99 kB
NPM Version
1.4.28
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
A very simple loader to require()
based on glob pattern matching. Please contribute by writing tests and examples.
$ npm install node-glob-loader
1function load(pattern, [options], [callback]) { 2 /*...*/ 3}
exports
and the file’s name.1 var loader = require('node-glob-loader'); 2 3 loader.load('./foo.js', function (exports,filename) { 4 console.log('Loaded ' + filename); 5 exports.foo(); 6 });
1 var loader = require('node-glob-loader'); 2 3 loader.load('./foo/*.js', function (exports,filename) { 4 console.log('Loaded ' + filename); 5 exports.foo(); 6 }).done(function () { 7 // Yeah! 8 });
foo
directory excluding bar.js
1 var loader = require('node-glob-loader'); 2 3 loader.load('./foo/[!bar]*.js', function (exports, filename) { 4 console.log('Loaded ' + filename); 5 exports.bar(); 6 });
.js
files in foo
's tree THEN do something nice1var loader = require('node-glob-loader'); 2 3loader.load('./foo/**/*.js', function (exports, filename) { 4 console.log('Loaded ' + filename); 5 exports.bar(); 6}).then(funtion () { 7 // Do Something Nice 8});
1var loader = require('node-glob-loader'); 2 3loader.load('./foo/**/*.js');
1var loader = require('node-glob-loader'); 2 3loader.load(['./foo.js', './foo/**/*.js'], function () { 4 exports.foo(); 5});
1var config = require("./config/" + process.env.NODE_ENV), 2 pckg = require("./package.json"), 3 bunyan = require("bunyan"), 4 hapi = require("hapi"), 5 server, 6 logger; 7 8logger = bunyan.createLogger({ 9 name: pckg.name, 10 serializers: bunyan.stdSerializers 11}); 12 13server = hapi.createServer( 14 config.application.host, 15 config.application.port, 16 config.application.options 17); 18 19server.app.logger = logger; 20server.app.configuration = config; 21 22server.start(function (error, info) { 23 var loader; 24 if (error) { 25 return logger.error(error); 26 } 27 28 logger.info("Server started @" + server.info); 29 30 loader = require("node-glob-loader"); 31 loader.load("./application/routes/*.*", function (routes, name) { 32 logger.info("Loading routes from " + name); 33 server.route(routes); 34 }); 35});
Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in a pattern. A backslash escapes the following character; the escaping backslash is discarded when matching. The special pattern characters must be quoted if they are to be matched literally.
The special pattern characters have the following meanings:
###* Matches any string, including the null string. When the globstar shell option is enabled, and ‘’ is used in a filename expansion context, two adjacent ‘’s used as a single pattern will match all files and zero or more directories and subdirectories. If followed by a ‘/’, two adjacent ‘*’s will match only directories and subdirectories.
###? Matches any single character.
###[…] Matches any one of the enclosed characters. A pair of characters separated by a hyphen denotes a range expression; any character that sorts between those two characters, inclusive, using the current locale’s collating sequence and character set, is matched. If the first character following the ‘[’ is a ‘!’ or a ‘^’ then any character not enclosed is matched. A ‘-’ may be matched by including it as the first or last character in the set. A ‘]’ may be matched by including it as the first character in the set. The sorting order of characters in range expressions is determined by the current locale and the value of the LC_COLLATE shell variable, if set.
For example, in the default C locale, ‘[a-dx-z]’ is equivalent to ‘[abcdxyz]’. Many locales sort characters in dictionary order, and in these locales ‘[a-dx-z]’ is typically not equivalent to ‘[abcdxyz]’; it might be equivalent to ‘[aBbCcDdxXyYz]’, for example. To obtain the traditional interpretation of ranges in bracket expressions, you can force the use of the C locale by setting the LC_COLLATE or LC_ALL environment variable to the value ‘C’.
Within ‘[’ and ‘]’, character classes can be specified using the syntax [:class:], where class is one of the following classes defined in the POSIX standard:
A character class matches any character belonging to that class. The word character class matches letters, digits, and the character ‘_’.
Within ‘[’ and ‘]’, an equivalence class can be specified using the syntax [=c=], which matches all characters with the same collation weight (as defined by the current locale) as the character c.
Within ‘[’ and ‘]’, the syntax [.symbol.] matches the collating symbol symbol.
If the extglob shell option is enabled using the shopt builtin, several extended pattern matching operators are recognized. In the following description, a pattern-list is a list of one or more patterns separated by a ‘|’. Composite patterns may be formed using one or more of the following sub-patterns:
###?(pattern-list) Matches zero or one occurrence of the given patterns.
###*(pattern-list) Matches zero or more occurrences of the given patterns.
###+(pattern-list) Matches one or more occurrences of the given patterns.
###@(pattern-list) Matches one of the given patterns.
###!(pattern-list) Matches anything except one of the given patterns.
(The MIT License)
Copyright (c) 2013 Droppe <robert@drop.pe>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 2/25 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More