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

glob

Package Overview
Dependencies
Maintainers
1
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glob - npm Package Compare versions

Comparing version 4.1.2-beta to 4.1.2

test/sync-cb-throw.js

10

glob.js

@@ -65,4 +65,7 @@ // Approach:

if (options.sync)
if (options.sync) {
if (cb)
throw new TypeError('callback provided to sync glob')
return globSync(pattern, options)
}

@@ -83,4 +86,7 @@ return new Glob(pattern, options, cb)

if (options && options.sync)
if (options && options.sync) {
if (cb)
throw new TypeError('callback provided to sync glob')
return new GlobSync(pattern, options)
}

@@ -87,0 +93,0 @@ if (!(this instanceof Glob))

2

package.json

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

"description": "a little globber",
"version": "4.1.2-beta",
"version": "4.1.2",
"repository": {

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

@@ -19,2 +19,5 @@ module.exports = globSync

function globSync (pattern, options) {
if (typeof options === 'function' || arguments.length === 3)
throw new TypeError('callback provided to sync glob')
return new GlobSync(pattern, options).found

@@ -27,2 +30,5 @@ }

if (typeof options === 'function' || arguments.length === 3)
throw new TypeError('callback provided to sync glob')
if (!(this instanceof GlobSync))

@@ -29,0 +35,0 @@ return new GlobSync(pattern, options)

@@ -111,2 +111,3 @@ {

"./test/stat.js",
"./test/sync-cb-throw.js",
"./test/zz-cleanup.js",

@@ -113,0 +114,0 @@ "/tmp/glob-test/asdf",

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