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

minimatch

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimatch - npm Package Compare versions

Comparing version 0.2.2 to 0.2.3

;

65

minimatch.js

@@ -1,2 +0,30 @@

module.exports = minimatch
;(function (require, exports, module, platform) {
if (module) module.exports = minimatch
else exports.minimatch = minimatch
if (!require) {
require = function (id) {
switch (id) {
case "path": return { basename: function (f) {
f = f.split(/[\/\\]/)
var e = f.pop()
if (!e) e = f.pop()
return e
}}
case "lru-cache": return function LRUCache () {
// not quite an LRU, but still space-limited.
var cache = {}
var cnt = 0
this.set = function (k, v) {
cnt ++
if (cnt >= 100) cache = {}
cache[k] = v
}
this.get = function (k) { return cache[k] }
}
}
}
}
minimatch.Minimatch = Minimatch

@@ -58,2 +86,26 @@

function ext (a, b) {
Object.keys(b).forEach(function (k) {
a[k] = b[k]
})
return a
}
minimatch.defaults = function (def) {
function m (p, pattern, options) {
return minimatch(p, pattern, ext(ext({}, def), options))
}
m.Minimatch = function (pattern, options) {
return new Minimatch(pattern, ext(ext({}, def), options))
}
return m
}
Minimatch.defaults = function (def) {
return minimatch.defaults(def).Minimatch
}
function minimatch (p, pattern, options) {

@@ -772,8 +824,5 @@ if (typeof pattern !== "string") {

// first, normalize any slash-separated path parts.
// f = path.normalize(f)
// windows: need to use /, not \
// On other platforms, \ is a valid (albeit bad) filename char.
if (process.platform === "win32") {
if (platform === "win32") {
f = f.split("\\").join("/")

@@ -989,1 +1038,7 @@ }

}
})( typeof require === "function" ? require : null,
this,
typeof module === "object" ? module : null,
typeof process === "object" ? process.platform : "win32"
)

2

package.json

@@ -5,3 +5,3 @@ {

"description": "a glob matcher in javascript",
"version": "0.2.2",
"version": "0.2.3",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

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