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.4 to 0.7.5

12

index.js

@@ -9,5 +9,7 @@ 'use strict';

var path = require('path');
var globby = require('globby');
var mm = require('micromatch');
var lazy = require('lazy-cache')(require);
lazy('globby', 'glob');
lazy('micromatch', 'mm');
/**

@@ -73,6 +75,6 @@ * Expose `mapFiles`

if (opts.cache === true) {
var fn = memo('glob', opts.cwd, patterns, globby.sync);
var fn = memo('glob', opts.cwd, patterns, lazy.glob.sync);
return fn(patterns, opts);
}
return globby.sync(patterns, opts);
return lazy.glob.sync(patterns, opts);
}

@@ -132,3 +134,3 @@

var fp = files[len];
if (mm.any(fp, patterns)) {
if (lazy.mm.any(fp, patterns)) {
continue;

@@ -135,0 +137,0 @@ }

{
"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.4",
"version": "0.7.5",
"homepage": "https://github.com/jonschlinkert/map-files",

@@ -10,13 +10,7 @@ "author": {

},
"repository": {
"type": "git",
"url": "https://github.com/jonschlinkert/map-files.git"
},
"repository": "jonschlinkert/map-files",
"bugs": {
"url": "https://github.com/jonschlinkert/map-files/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jonschlinkert/map-files/blob/master/LICENSE-MIT"
},
"license": "MIT",
"files": [

@@ -33,4 +27,5 @@ "index.js"

"dependencies": {
"globby": "^1.2.0",
"micromatch": "^2.1.5"
"globby": "^2.1.0",
"lazy-cache": "^0.2.3",
"micromatch": "^2.2.0"
},

@@ -37,0 +32,0 @@ "devDependencies": {

@@ -1,2 +0,2 @@

# map-files [![NPM version](https://badge.fury.io/js/map-files.svg)](http://badge.fury.io/js/map-files) [![Build Status](https://travis-ci.org/jonschlinkert/map-files.svg)](https://travis-ci.org/jonschlinkert/map-files)
# map-files [![NPM version](https://badge.fury.io/js/map-files.svg)](http://badge.fury.io/js/map-files) [![Build Status](https://travis-ci.org/jonschlinkert/map-files.svg)](https://travis-ci.org/jonschlinkert/map-files)

@@ -7,6 +7,6 @@ > 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.

## Install with [npm](npmjs.org)
Install with [npm](https://www.npmjs.com/)
```bash
npm i map-files --save
```sh
$ npm i map-files --save
```

@@ -20,2 +20,3 @@

```
Returns an object that looks something like:

@@ -37,3 +38,2 @@

### options.cwd

@@ -45,3 +45,2 @@

Specify the current working directory

@@ -68,2 +67,3 @@

```
Returns something like:

@@ -77,3 +77,2 @@

### options.read

@@ -100,32 +99,34 @@

## Other files libs
* [file-reader](https://github.com/jonschlinkert/file-reader): Read a glob of files, dynamically choosing the reader or requiring the files based on the file extension.
* [filter-files](https://github.com/jonschlinkert/filter-files): Recursively read directories and return a list of files, filtered to have only the files for which the (optional) filter function returns `true`. Sync and async.
* [micromatch](https://github.com/jonschlinkert/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch (10-45x faster on avg). Just use `minimatch.isMatch()` instead of `multimatch()` or `minimatch()`.
* [export-files](https://github.com/jonschlinkert/export-files): node.js utility for exporting a directory of files as modules.
* [export-files](https://www.npmjs.com/package/export-files): node.js utility for exporting a directory of files as modules. | [homepage](https://github.com/jonschlinkert/export-files)
* [file-reader](https://www.npmjs.com/package/file-reader): Read a glob of files, dynamically choosing the reader or requiring the files based on… [more](https://www.npmjs.com/package/file-reader) | [homepage](https://github.com/jonschlinkert/file-reader)
* [filter-files](https://www.npmjs.com/package/filter-files): Recursively read directories and return a list of files, filtered to have only the files… [more](https://www.npmjs.com/package/filter-files) | [homepage](https://github.com/jonschlinkert/filter-files)
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just… [more](https://www.npmjs.com/package/micromatch) | [homepage](https://github.com/jonschlinkert/micromatch)
## Running tests
Install dev dependencies.
```bash
npm i -d && npm test
Install dev dependencies:
```sh
$ npm i -d && npm test
```
## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-files/issues)
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/map-files/issues/new).
## Author
**Jon Schlinkert**
+ [github/jonschlinkert](https://github.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
## License
Copyright (c) 2014-2015 Jon Schlinkert
Released under the MIT license
Copyright © 2014-2015 Jon Schlinkert
Released under the MIT license.
***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 22, 2015._
[globby]: https://github.com/sindresorhus/globby
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 21, 2015._
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