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

map-files

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

map-files - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

21

index.js

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

var globby = require('globby');
var mm = require('micromatch');

@@ -37,3 +38,3 @@ /**

opts.cwd = opts.cwd ? path.resolve(opts.cwd) : process.cwd();
var files = glob(patterns, opts);
var files = without(glob(patterns, opts), opts.ignored || []);

@@ -69,3 +70,2 @@ if (opts.cache === true) {

opts = opts || {};
if (typeof opts.glob === 'function') {

@@ -123,1 +123,18 @@ return opts.glob(patterns, opts);

}
/**
* Returns an array of file paths excluding
* files that match the given glob patterns.
*/
function without(files, patterns) {
var len = files.length, res = [];
while (len--) {
var fp = files[len];
if (mm.any(fp, patterns)) {
continue;
}
res.push(fp);
}
return res;
}

5

package.json
{
"name": "map-files",
"description": "Return an object for a glob of files. Pass a `rename` function for the keys, or a `parse` function for the content, allowing it to be used for readable or require-able files.",
"version": "0.7.3",
"version": "0.7.4",
"homepage": "https://github.com/jonschlinkert/map-files",

@@ -32,3 +32,4 @@ "author": {

"dependencies": {
"globby": "^1.2.0"
"globby": "^1.2.0",
"micromatch": "^2.1.5"
},

@@ -35,0 +36,0 @@ "devDependencies": {

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