Socket
Socket
Sign inDemoInstall

@humanwhocodes/config-array

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@humanwhocodes/config-array - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

12

api.js

@@ -142,4 +142,2 @@ 'use strict';

// TODO: Execute config functions
return [...flatTraverse(items)];

@@ -293,4 +291,6 @@ }

* Returns the `files` globs from every config object in the array.
* Negated patterns (those beginning with `!`) are not returned.
* This can be used to determine which files will be matched by a
* config array.
* config array or to use as a glob pattern when no patterns are provided
* for a command line interface.
* @returns {string[]} An array of string patterns.

@@ -308,4 +308,6 @@ */

if (Array.isArray(filePattern)) {
result.push(...filePattern);
} else {
result.push(...filePattern.filter(pattern => {
return !pattern.startsWith("!");
}));
} else if (!filePattern.startsWith("!")) {
result.push(filePattern);

@@ -312,0 +314,0 @@ }

{
"name": "@humanwhocodes/config-array",
"version": "0.2.1",
"version": "0.2.2",
"description": "Glob-based configuration matching.",

@@ -5,0 +5,0 @@ "author": "Nicholas C. Zakas",

@@ -149,2 +149,11 @@ # Config Array

handler: jsTestHandler
},
// filename must not match patterns beginning with !
{
name: "Non-JS files",
files: ["!*.js"],
settings: {
js: false
}
}

@@ -158,2 +167,4 @@ ];

If a pattern in the files array begins with `!` then it excludes that pattern. In the preceding example, any filename that doesn't end with `.js` will automatically getting a `settings.js` property set to `false`.
### Config Functions

@@ -160,0 +171,0 @@

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