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

broccoli-content-funnel

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-content-funnel - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

14

index.js

@@ -9,2 +9,3 @@ 'use strict';

const realpath = denodeify(fs.realpath);
const lstats = denodeify(fs.lstats);

@@ -41,6 +42,9 @@ class ContentFunnel extends Funnel {

if (item.stats.isSymbolicLink()) {
return realpath(item.path);
return Promise.all([
realpath(item.path),
lstats(item.path)
]).then(([path, stats]) => ({ path, stats }));
}
return item.path;
}).then(filePath => {
return item;
}).then(item => {
if (item.stats.isDirectory()) {

@@ -50,5 +54,5 @@ return;

if (type === 'function') {
return this.options[option](filePath);
return this.options[option](item.path);
}
return readFile(filePath, 'utf8').then(source => {
return readFile(item.path, 'utf8').then(source => {
if (type === 'string') {

@@ -55,0 +59,0 @@ return source.indexOf(this.options[option]) !== -1;

{
"name": "broccoli-content-funnel",
"version": "0.0.2",
"version": "0.0.3",
"description": "Funnel based on file contents",

@@ -5,0 +5,0 @@ "main": "index.js",

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