Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
glob-whatev
Advanced tools
Readme
A quick and dirty synchronous file globbing utility based on minimatch.
I wanted to make grunt work on Windows. Unfortunately, node-glob doesn't work on Windows, and miniglob isn't synchronous. And this needed to be synchronous.
This library works with any path that minimatch supports, and is the core of the grunt wildcard globbing methods.
To be fair, this library isn't terribly efficient. But that's ok, because it's mainly used with relatively small folder structures. Maybe someone will help improve this library (patches welcome!). Or maybe even write a better library, and then I'll use that instead. But for now, this works just fine.
First, install the module with: npm install glob-whatev
var globsync = require('glob-whatev');
// Relative patterns are matched against the current working directory.
globsync.glob('foo/**/*.js').forEach(function(filepath) {
// do stuff with `filepath`
});
// Basically, it works like this.
globsync.glob(globPattern [, minimatchOptions])
// Also, minimatch is exposed in case you just want to match patterns, eg.
var isJS = globsync.minimatch(file, '*.js', {matchBase: true});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
options.cwd
option to allow searching from a different base directory than process.cwd()
. Added options.maxDepth
unit tests.matchBase
minimatch option with simple patterns would fail.Copyright (c) 2012 "Cowboy" Ben Alman
Licensed under the MIT license.
http://benalman.com/about/license/
FAQs
A quick and dirty file globbing utility based on minimatch.
The npm package glob-whatev receives a total of 4,014 weekly downloads. As such, glob-whatev popularity was classified as popular.
We found that glob-whatev demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.