New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@voxpelli/config-array-find-files

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voxpelli/config-array-find-files

A proof of concept of a generic equivalent of ESLint's globSearch() for use with ConfigArray

  • 1.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@voxpelli/config-array-find-files

A proof of concept of a generic equivalent of ESLint's globSearch() for use with ConfigArray

npm version npm downloads neostandard javascript style Module type: ESM Types in JS Follow @voxpelli@mastodon.social

Usage

import { ConfigArray } from '@eslint/config-array';
import { configArrayFindFiles } from '@voxpelli/config-array-find-files';

// Ensure you have a normalized config at hand...

const configs = new ConfigArray([
  { files: ['*.js'] },
  { files: ['*.md'] },
]);
await configs.normalize();

// ...then you are ready to find some files!

const filePaths = await configArrayFindFiles({
  basePath: path.join(dirname(import.meta.url), '../'),
  configs,
});

API

configArrayFindFiles()

Takes a value (input), does something configured by the config (configParam) and returns the processed value asyncly(output)

Syntax
configArrayFindFiles(options) => Promise<string[]>
Options
  • basePath - the directory to search
  • configs - the config array to use for determining what to ignore
  • deepFilter - optional function that indicates whether the directory will be read deep or not
  • entryFilter - optional function that indicates whether the entry will be included to results or not
Returns

A Promise that resolves to an array with string file paths for all matching files

FAQs

Package last updated on 04 Jan 2025

Did you know?

Socket

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.

Install

Related posts

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