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

commoner

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commoner - npm Package Compare versions

Comparing version 0.8.7 to 0.8.8

35

lib/grep.js

@@ -15,17 +15,22 @@ var assert = require("assert");

var grepExtensionDef = Q.defer();
var grepExtensionP = grepExtensionDef.promise;
run("grep", [
"--quiet",
"--perl-regexp",
"spawn",
__filename
]).on("close", function(code) {
if (code === 0 || code === 1) {
grepExtensionDef.resolve("--perl-regexp");
} else {
grepExtensionDef.resolve("--extended-regexp");
var _grepExtensionP;
function grepExtensionP() {
if (!_grepExtensionP) {
var grepExtensionDef = Q.defer();
run("grep", [
"--quiet",
"--perl-regexp",
"spawn",
__filename
]).on("close", function(code) {
if (code === 0 || code === 1) {
grepExtensionDef.resolve("--perl-regexp");
} else {
grepExtensionDef.resolve("--extended-regexp");
}
});
_grepExtensionP = grepExtensionDef.promise;
}
});
return _grepExtensionP;
}

@@ -98,5 +103,5 @@ function grepP(pattern, sourceDir, grepExtension) {

module.exports = function(pattern, sourceDir) {
return grepExtensionP.then(function(extension) {
return grepExtensionP().then(function(extension) {
return grepP(pattern, sourceDir, extension);
});
};

@@ -17,3 +17,3 @@ {

],
"version": "0.8.7",
"version": "0.8.8",
"license": "MIT",

@@ -20,0 +20,0 @@ "homepage": "http://github.com/benjamn/commoner",

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